StructuredDocument size reduced after 2.5.1 to 2.7.5 upgrade
Hello again, I am using StructuredDocument objects in the custom products I am migrating to 2.7.5 from 2.5.1. In 2.7.5 I am now getting an error Value Error Maximum content length exceeded when attempting to save changes (edits) of StructuredDocument objects with "large" amounts of content - even when there was no problem with the same "large" amount of content in 2.5.1. This error under 2.7.5 happens if a migrated object already has more than a certain amount of content in it when I do a TTW edit/update of the object using e.g. self.manage_changeProperties(REQUEST) It also happens at some point when I start adding increasing amounts of text into a StructuredDocument object that initially has "small" amounts of content ("small" meaning not enough to trigger this error under 2.7.5). I don't know exactly how much is too much. I do know that it is not very much at all, and certainly far less than the DTML document basis for a StructuredDocument can hold. It is also far less than what my StructuredDocument objects *already hold* under 2.5.1. Anyone have any idea why I'm getting this size-related error with StructuredDocument only after migrating to 2.7.5? And how to fix it, of course... :-? thanks, John S. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
John Schinnerer wrote:
I am using StructuredDocument objects in the custom products I am migrating to 2.7.5 from 2.5.1.
In 2.7.5 I am now getting an error
Value Error Maximum content length exceeded ... Anyone have any idea why I'm getting this size-related error with StructuredDocument only after migrating to 2.7.5? And how to fix it, of course... :-?
Sorry, but I cannot reproduce this problem with Zope 2.7.7 and large amounts of text in a StructuredDocument... can you send me a .zexp-Export of a StructeredDocument created with 2.5.1 which shows the behavior in 2.7.x? Maybe I'll can reproduce it and find the problem, but I don't think that it is related to StructuredDocument, because nearly all code is acquired from DTML-Document... Cheers, Maik
Hello,
John Schinnerer wrote:
I am using StructuredDocument objects in the custom products I am migrating to 2.7.5 from 2.5.1.
In 2.7.5 I am now getting an error
Value Error Maximum content length exceeded ... Anyone have any idea why I'm getting this size-related error with StructuredDocument only after migrating to 2.7.5? And how to fix it, of course... :-?
Sorry, but I cannot reproduce this problem with Zope 2.7.7 and large amounts of text in a StructuredDocument... can you send me a .zexp-Export of a StructeredDocument created with 2.5.1 which shows the behavior in 2.7.x? Maybe I'll can reproduce it and find the problem, but I don't think that it is related to StructuredDocument, because nearly all code is acquired from DTML-Document...
For any StructuredDocument object I have, it breaks at approximately 4490 chars (seems to vary by a few chars - maybe due to how many line breaks...?). Less works OK; more returns the above error. My sysadmin did some serious digging and says the error message I get appears in /usr/lib/python2.3/cgi.py, lines # 142,272, and 511 he didn't find anything in the Zope code base that has this message. So may be a python thing...? Also says it looks like maxlen is getting mangled somehow (though the default is unlimited?). Attached is a zexp of the StructuredDocument object I just used to get the estimate of where it breaks. thanks, John S. ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs
John Schinnerer wrote at 2005-8-30 00:09 -0700:
... For any StructuredDocument object I have, it breaks at approximately 4490 chars (seems to vary by a few chars - maybe due to how many line breaks...?). Less works OK; more returns the above error.
Some Zope version may have introduced a few new configuration options to control the size of uploaded objects (I see them in Zope 2.8.1 after I upgraded from Zope 2.7.1) -- maybe some of them are responsible... PS: I was unable to reproduce the problem: I got an "The object *broken* does not support this operation". Apparently, the reproduction needs something unavailable in Zope 2.8.1. -- Dieter
Dne úterý, 30. srpna 2005 20:33 Dieter Maurer <dieter@handshake.de> napsal(a):
John Schinnerer wrote at 2005-8-30 00:09 -0700:
... For any StructuredDocument object I have, it breaks at approximately 4490 chars (seems to vary by a few chars - maybe due to how many line breaks...?). Less works OK; more returns the above error.
Some Zope version may have introduced a few new configuration options to control the size of uploaded objects (I see them in Zope 2.8.1 after I upgraded from Zope 2.7.1) -- maybe some of them are responsible...
maybe form trasport method too, see POST vs. GET. -- Jaroslav Lukesh ----------------------------------------------------------- This e-mail can not contain any viruses because I use Linux
Aloha,
Some Zope version may have introduced a few new configuration options to control the size of uploaded objects (I see them in Zope 2.8.1 after I upgraded from Zope 2.7.1) -- maybe some of them are responsible...
Where are they located? I don't see anything like that in the ZMI for 2.7.5. Are they in config files (which ones?), or...?
maybe form trasport method too, see POST vs. GET.
Form transport method is the same as before the upgrade from 2.5.1 to 2.7.5 - I changed nothing in my products or other code, only zope was upgraded. Did something about form transport method that would affect programmatic file upload size change between these two zope versions ? thanks, John S. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Dne pondělí, 5. září 2005 7:59 John Schinnerer <johnschinnerer@yahoo.com> napsal(a):
Aloha,
maybe form trasport method too, see POST vs. GET.
Form transport method is the same as before the upgrade from 2.5.1 to 2.7.5 - I changed nothing in my products or other code, only zope was upgraded.
did you use POST or GET? If yoou use GET, use POST. If you use POST, then I dont know.
Did something about form transport method that would affect programmatic file upload size change between these two zope versions ?
With POST you can upload unlimited amount of data. With GET it is limited to maximal ULR length of some programs (browser/proxy/server). -- Jaroslav Lukesh ----------------------------------------------------------- This e-mail can not contain any viruses because I use Linux
Aloha,
did you use POST or GET? If yoou use GET, use POST. If you use POST, then I dont know.
Using POST, and I don't know either... Anyone else have any ideas? To recap, my server was upgraded from zope 2.5.1 to 2.7.5 and now StructuredDocument objects in a product I have built have a rather small limit (about 4-6K) on how much content can be put into them. The content is being put into them from content in a web form text area using a call like self.some-structured-document-object.manage_edit(REQUEST.stx-content, 'Name of Content') Nothing in the product was touched/changed, just the zope upgrade. The error message now returned in the browser window when I try and update a structured document with more than ~4-6K of content via web form is this: ------------------ Site Error An error was encountered while publishing this resource. Error Type: ValueError Error Value: Maximum content length exceeded Troubleshooting Suggestions * The URL may be incorrect. * The parameters passed to this resource may be incorrect. * A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the error log. If the error persists please contact the site maintainer. Thank you for your patience. ------------------ This error is *not* showing up in the error log viewable from the root of the zope instance. thanks, John S. ______________________________________________________ Click here to donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/
Aloha, OK, it's not just StructuredDocument objects, Image objects have the same problem, anything over about ~5-8K gets the same error message. Probably everything will, those are just the ones that have emerged first for me... Does anyone know what could be causing this? If it's some new configuration option(s) for 'content length' in 2.7.5, where the heck do I find and tweak them? I don't see anything in the ZMI that would affect this, don't know where else to look. thanks, John S.
To recap, my server was upgraded from zope 2.5.1 to 2.7.5 and now StructuredDocument objects in a product I have built have a rather small limit (about 4-6K) on how much content can be put into them. The content is being put into them from content in a web form text area using a call like
self.some-structured-document-object.manage_edit(REQUEST.stx-content, 'Name of Content')
Nothing in the product was touched/changed, just the zope upgrade.
The error message now returned in the browser window when I try and update a structured document with more than ~4-6K of content via web form is this:
------------------
Site Error
An error was encountered while publishing this resource.
Error Type: ValueError Error Value: Maximum content length exceeded
Troubleshooting Suggestions
* The URL may be incorrect. * The parameters passed to this resource may be incorrect. * A resource that this resource relies on may be encountering an error.
For more detailed information about the error, please refer to the error log.
If the error persists please contact the site maintainer. Thank you for your patience.
------------------
This error is *not* showing up in the error log viewable from the root of the zope instance.
thanks, John S.
______________________________________________________ Click here to donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/
As Dieter already said, this is due to you having cgi-maxlen or http-header-max-length (when using GET) set too low in etc/zope.conf. Florent John Schinnerer wrote:
Aloha,
OK, it's not just StructuredDocument objects, Image objects have the same problem, anything over about ~5-8K gets the same error message. Probably everything will, those are just the ones that have emerged first for me...
Does anyone know what could be causing this? If it's some new configuration option(s) for 'content length' in 2.7.5, where the heck do I find and tweak them? I don't see anything in the ZMI that would affect this, don't know where else to look.
thanks, John S.
To recap, my server was upgraded from zope 2.5.1 to 2.7.5 and now StructuredDocument objects in a product I have built have a rather small limit (about 4-6K) on how much content can be put into them. The content is being put into them from content in a web form text area using a call like
self.some-structured-document-object.manage_edit(REQUEST.stx-content, 'Name of Content')
Nothing in the product was touched/changed, just the zope upgrade.
The error message now returned in the browser window when I try and update a structured document with more than ~4-6K of content via web form is this:
------------------
Site Error
An error was encountered while publishing this resource.
Error Type: ValueError Error Value: Maximum content length exceeded
Troubleshooting Suggestions
* The URL may be incorrect. * The parameters passed to this resource may be incorrect. * A resource that this resource relies on may be encountering an error.
For more detailed information about the error, please refer to the error log.
If the error persists please contact the site maintainer. Thank you for your patience.
------------------
This error is *not* showing up in the error log viewable from the root of the zope instance.
thanks, John S.
-- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D +33 1 40 33 71 59 http://nuxeo.com fg@nuxeo.com
Hello,
As Dieter already said, this is due to you having cgi-maxlen or http-header-max-length (when using GET) set too low in etc/zope.conf.
That was what I needed, the parameter name...my sysadmin set it low for security reasons, not realizing it would impact my content editing products, he will bump it up and hopefully that will fix this. thanks, John S. ______________________________________________________ Click here to donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/
John Schinnerer wrote:
That was what I needed, the parameter name...my sysadmin set it low for security reasons, not realizing it would impact my content editing products, he will bump it up and hopefully that will fix this.
Clueless overly paranoid sysadmins strike again ;-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Aloha,
That was what I needed, the parameter name...my sysadmin set it low for security reasons, not realizing....
Clueless overly paranoid sysadmins strike again ;-)
No actually, he's very clueful and security-conscious, and I was mistaken about how it got set that low, it appears to be a debian package default setting. FYI anyone upgrading to the recent Debian 3.1 release (sarge), the default in the config file in the zope package (2.7.5 final) in sarge has cgi-maxlen set quite low, 10000 if I recall correctly, to block potential DOS attacks according to the comment on the setting (Debian is perhaps a bit paranoid in this case...). So a default debian upgrade will leave you with a very small cgi-maxlen in the zope config file - be sure to check it and change it if needed. cheers, John S. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
John Schinnerer wrote:
That was what I needed, the parameter name...my sysadmin set it low for security reasons, not realizing....
Clueless overly paranoid sysadmins strike again ;-)
No actually, he's very clueful and security-conscious, and I was mistaken about how it got set that low, it appears to be a debian package default setting.
Ah, my mistake, clueless overly paranoid debian packagers ;-) (they're very close in breed *grinz*) Glad to hear your sysadmin doesn't fall into the former category though!
FYI anyone upgrading to the recent Debian 3.1 release (sarge), the default in the config file in the zope package (2.7.5 final) in sarge has cgi-maxlen set quite low, 10000 if I recall correctly, to block potential DOS attacks according to the comment on the setting (Debian is perhaps a bit paranoid in this case...).
*thunks head against wall* Anyone know who the debian package maintainer is so we can give them a tickle? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Chris Withers wrote:
Anyone know who the debian package maintainer is so we can give them a tickle?
Just look at the zope package page on debian.org: http://packages.debian.org/zope Isa simple, no? :) Seriously though, Debian maintainers usually make reasonably sane decisions, so be gentle. Martijn Pieters
John Schinnerer wrote:
I am using StructuredDocument objects in the custom products I am migrating to 2.7.5 from 2.5.1.
In 2.7.5 I am now getting an error
Value Error Maximum content length exceeded
...
... Attached is a zexp of the StructuredDocument object I just used to get the estimate of where it breaks.
I cannot reproduce the problem with 2.7.7... I can store 100KB or more without any problem. So I guess something in your python/zope-install is going mad. Just a hint: The problem should also occur if you try to store much content in a DTML-Document with your setup... Cheers, Maik
participants (7)
-
Chris Withers -
Dieter Maurer -
Florent Guillaume -
Jaroslav Lukesh -
John Schinnerer -
Maik Jablonski -
Martijn Pieters