Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Massimo Di Pierro
Try replace

 request.body = copystream_progress(request) ### stores request body   
  

with

try:
request.body = copystream_progress(request) ### stores request body 
except IOError:
raise HTTP(400,"Bad Request - HTTP body is incomplete")

in main.py. Does the problem goes away? I am afraid any response we 
generate will propagator to the web server and it will log some error on 
failure to respond to the client.

On Monday, 16 July 2012 21:28:14 UTC-5, Bruce Wade wrote:
>
> I personally think if we are just going to leave it as it, then we should 
> not have it create an error ticket as I have had plenty of tickets created 
> by this.
>
> On Mon, Jul 16, 2012 at 7:13 PM, Massimo Di Pierro <
> massimo.dipie...@gmail.com> wrote:
>
>> The more I think about this the more I am convinced this is not of 
>> concern.
>>
>> It is very well possible that a slow client sends you the header of a 
>> request, then closes the connection before finishing (perhaps the user 
>> killed the page, or stopped the browser while doing an upload or something 
>> slow).
>>
>> At some point web2py fails because of this and apache logs it. Where 
>> web2py fails depends on the exact timing but it likely to fail while 
>> copying the input stream. Which is the error you get.
>>
>> I think it correct to log these events.
>>
>> We could catch this specific error and have a more descriptive error but 
>> - while this is the place which is the most likely to fail - the failure 
>> could be somewhere else and we would not be catching the same error.
>>
>> I do not think this should be changed and I do not think this should be a 
>> concern. It tells you some uses have a slow connection.
>>
>> What do others think?
>>
>>
>> On Monday, July 16, 2012 7:12:16 PM UTC-5, Brian M wrote:
>>>
>>> I'm on Version 1.99.4 (2011-12-22 11:20:45) stable.  Yeah it is a bit 
>>> old - at this point waiting for 2.0 stable to come out.
>>>
>>> On Monday, July 16, 2012 9:58:53 AM UTC-5, Massimo Di Pierro wrote:

 Which web2py version? The error is from copying the request body into a 
 tmp object in web2py. Looks like the request declares a size in the header 
 but it is shorter (truncated).



 On Friday, 13 July 2012 16:27:51 UTC-5, Brian M wrote:
>
> I'm having ongoing problems with IOErrors from one of my web2py apps 
> deployed on Windows with Apache & mod_wsgi.  Looks to me like the error 
> maybe happening at a lower level before it even gets to my app code?
>
> Traceback (most recent call last):
> File "C:\\dashboard\\web2py\\gluon\**\main.py", line 447, in wsgibase
> parse_get_post_vars(request, environ)
> File "C:\\dashboard\\web2py\\gluon\**\main.py", line 275, in 
> parse_get_post_vars
> request.body = copystream_progress(request) ### stores request body
> File "C:\\dashboard\\web2py\\gluon\**\main.py", line 143, in 
> copystream_progress
> copystream(source, dest, size, chunk_size)
> File "C:\\dashboard\\web2py\\gluon\**\fileutils.py", line 374, in 
> copystream
> data = src.read(size)
> IOError: request data read error
>
  -- 
>>  
>>  
>>  
>>
>
>
>
> -- 
> -- 
> Regards,
> Bruce Wade
> http://ca.linkedin.com/in/brucelwade
> http://www.wadecybertech.com
> http://www.fittraineronline.com - Fitness Personal Trainers Online
> http://www.warplydesigned.com
>
>

-- 





Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Bruce Wade
I personally think if we are just going to leave it as it, then we should
not have it create an error ticket as I have had plenty of tickets created
by this.

On Mon, Jul 16, 2012 at 7:13 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> The more I think about this the more I am convinced this is not of concern.
>
> It is very well possible that a slow client sends you the header of a
> request, then closes the connection before finishing (perhaps the user
> killed the page, or stopped the browser while doing an upload or something
> slow).
>
> At some point web2py fails because of this and apache logs it. Where
> web2py fails depends on the exact timing but it likely to fail while
> copying the input stream. Which is the error you get.
>
> I think it correct to log these events.
>
> We could catch this specific error and have a more descriptive error but -
> while this is the place which is the most likely to fail - the failure
> could be somewhere else and we would not be catching the same error.
>
> I do not think this should be changed and I do not think this should be a
> concern. It tells you some uses have a slow connection.
>
> What do others think?
>
>
> On Monday, July 16, 2012 7:12:16 PM UTC-5, Brian M wrote:
>>
>> I'm on Version 1.99.4 (2011-12-22 11:20:45) stable.  Yeah it is a bit old
>> - at this point waiting for 2.0 stable to come out.
>>
>> On Monday, July 16, 2012 9:58:53 AM UTC-5, Massimo Di Pierro wrote:
>>>
>>> Which web2py version? The error is from copying the request body into a
>>> tmp object in web2py. Looks like the request declares a size in the header
>>> but it is shorter (truncated).
>>>
>>>
>>>
>>> On Friday, 13 July 2012 16:27:51 UTC-5, Brian M wrote:

 I'm having ongoing problems with IOErrors from one of my web2py apps
 deployed on Windows with Apache & mod_wsgi.  Looks to me like the error
 maybe happening at a lower level before it even gets to my app code?

 Traceback (most recent call last):
 File "C:\\dashboard\\web2py\\gluon\**\main.py", line 447, in wsgibase
 parse_get_post_vars(request, environ)
 File "C:\\dashboard\\web2py\\gluon\**\main.py", line 275, in
 parse_get_post_vars
 request.body = copystream_progress(request) ### stores request body
 File "C:\\dashboard\\web2py\\gluon\**\main.py", line 143, in
 copystream_progress
 copystream(source, dest, size, chunk_size)
 File "C:\\dashboard\\web2py\\gluon\**\fileutils.py", line 374, in
 copystream
 data = src.read(size)
 IOError: request data read error

>>>  --
>
>
>
>



-- 
-- 
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com
http://www.fittraineronline.com - Fitness Personal Trainers Online
http://www.warplydesigned.com

-- 





Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Niphlod
You're right, it's 1 query per request more (2 if session is updated), but 
it's a pkey lookup (and eventually an update) vs scan a dir, open file, 
lock it, read it, (eventually save) and close it. 

Without available perftest I tend to agree that file-based session in 
separate folders is better for environment where web2py is launched on 
multiple machines against a single database server (as I intended your 
setup actually is), but for single instances with the application server 
being the same of the database server, I'd rather not place my bet.

BTW: I'm using postgres

PS: remember to trash expired session in any case

On Monday, July 16, 2012 8:52:13 PM UTC+2, Bruce Wade wrote:
>
> Storing them in the database will slow down your website depending on 
> which database, how many users and how many sessions you create. On a heavy 
> hit site the DB is going to slow down a lot.
>
> I am trying to figure out a way how to handle sessions on the client site 
> as secure as possible so the servers don't get hit hard
>
> On Mon, Jul 16, 2012 at 11:44 AM, Niphlod  wrote:
>
>> I'm storing sessions on database for my app with no apparent problems 
>> (1.99.7 stable) for storing them in redis, currently there is no way 
>> (sorry). 
>> When I implemented cache in redis it seemed that I was the only one using 
>> a redis stack along web2py...generally redis adoption is quite sparse in 
>> web2py world, and the only implemented thing is the cache backend.
>> Anyway if there are demands in this sense, I could write something up, 
>> but some changes to how sessions are handled in web2py (namely in 
>> gluon.main.wsgibase) are needed.
>>
>>
>>
>>
>> On Monday, July 16, 2012 6:58:54 PM UTC+2, rochacbruno wrote:
>>>
>>>
>>> I tested putting sessions in database, but for some strange reason, when 
>>> sessions are in db, user are not redirect to login._next after the login, 
>>> and other issues. Also I think sessions in db gets a bit slower.
>>>
>>> I am planning to test sessions in redis.
>>>
>>>
>>> On Mon, Jul 16, 2012 at 1:01 PM, Bruce Wade wrote:
>>>
 That I/o warning shouldn't take down your site I have the same issue 
 with linode. I think sessions need to be done differently especially on 
 high load sites with a load balancer sometimes I find over 400,000 files 
 in 
 the session folder on each server × 4
  On Jul 16, 2012 8:14 AM, "Bruno Rocha"  wrote:

> I am having a related problem.
>
> "Your Linode, blouserver, has exceeded the notification threshold 
> (1000) for disk io rate by averaging 1382.77 for the last 2 hours: 
>
> I receive this message every 2 hour, so my nginx get bas gateway and I 
> need to do "rm sessions/* " and also  "/etc/init.d/uwsgi restart" to get 
> the site running again.
>
>
>
> On Mon, Jul 16, 2012 at 12:07 PM, Massimo Di Pierro <
> massimo.dipie...@gmail.com> wrote:
>
>> This may be related to a bug in rocket that was not catching 
>> timouterror and occasionally sending/receiving incomplete requests.
>>
>> Try upgrade rocket.py yo trunk. You can leave everything unchanged. 
>> Let us know if the error go away.
>>
>> It is also possible that the request is actually invalid (the browser 
>> declares a different size than it sends). Perhaps because of network 
>> issues. Perhaps web2py could report a better (clearer error). Do you 
>> think 
>> it should be logged or silently ignore and the request dropped?
>>
>> Massimo
>>
>>
>> On Monday, 16 July 2012 10:00:14 UTC-5, Bruce Wade wrote:
>>>
>>> I am using the latest stable still.
>>>
>>> On Mon, Jul 16, 2012 at 7:58 AM, Massimo Di Pierro <
>>> massimo.dipie...@gmail.com> wrote:
>>>
 Which web2py version? The error is from copying the request body 
 into a tmp object in web2py. Looks like the request declares a size in 
 the 
 header but it is shorter (truncated).



 On Friday, 13 July 2012 16:27:51 UTC-5, Brian M wrote:
>
> I'm having ongoing problems with IOErrors from one of my web2py 
> apps deployed on Windows with Apache & mod_wsgi.  Looks to me like 
> the 
> error maybe happening at a lower level before it even gets to my app 
> code?
>
> Traceback (most recent call last):
> File "C:\\dashboard\\web2py\\gluon\**\main.py", line 447, in 
> wsgibase
> parse_get_post_vars(request, environ)
> File "C:\\dashboard\\web2py\\gluon\**\main.py", line 275, in 
> parse_get_post_vars
> request.body = copystream_progress(request) ### stores request body
> File "C:\\dashboard\\web2py\\gluon\**\main.py", line 143, in 
> copystream_progress
> copystream(source, dest, size, chunk_size)
> File "C:\\dashboard\\web2py\\gluon\**\fileutils.py", line 

Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Bruce Wade
Storing them in the database will slow down your website depending on which
database, how many users and how many sessions you create. On a heavy hit
site the DB is going to slow down a lot.

I am trying to figure out a way how to handle sessions on the client site
as secure as possible so the servers don't get hit hard

On Mon, Jul 16, 2012 at 11:44 AM, Niphlod  wrote:

> I'm storing sessions on database for my app with no apparent problems
> (1.99.7 stable) for storing them in redis, currently there is no way
> (sorry).
> When I implemented cache in redis it seemed that I was the only one using
> a redis stack along web2py...generally redis adoption is quite sparse in
> web2py world, and the only implemented thing is the cache backend.
> Anyway if there are demands in this sense, I could write something up, but
> some changes to how sessions are handled in web2py (namely in
> gluon.main.wsgibase) are needed.
>
>
>
>
> On Monday, July 16, 2012 6:58:54 PM UTC+2, rochacbruno wrote:
>>
>>
>> I tested putting sessions in database, but for some strange reason, when
>> sessions are in db, user are not redirect to login._next after the login,
>> and other issues. Also I think sessions in db gets a bit slower.
>>
>> I am planning to test sessions in redis.
>>
>>
>> On Mon, Jul 16, 2012 at 1:01 PM, Bruce Wade  wrote:
>>
>>> That I/o warning shouldn't take down your site I have the same issue
>>> with linode. I think sessions need to be done differently especially on
>>> high load sites with a load balancer sometimes I find over 400,000 files in
>>> the session folder on each server × 4
>>>  On Jul 16, 2012 8:14 AM, "Bruno Rocha"  wrote:
>>>
 I am having a related problem.

 "Your Linode, blouserver, has exceeded the notification threshold
 (1000) for disk io rate by averaging 1382.77 for the last 2 hours:

 I receive this message every 2 hour, so my nginx get bas gateway and I
 need to do "rm sessions/* " and also  "/etc/init.d/uwsgi restart" to get
 the site running again.



 On Mon, Jul 16, 2012 at 12:07 PM, Massimo Di Pierro <
 massimo.dipie...@gmail.com> wrote:

> This may be related to a bug in rocket that was not catching
> timouterror and occasionally sending/receiving incomplete requests.
>
> Try upgrade rocket.py yo trunk. You can leave everything unchanged.
> Let us know if the error go away.
>
> It is also possible that the request is actually invalid (the browser
> declares a different size than it sends). Perhaps because of network
> issues. Perhaps web2py could report a better (clearer error). Do you think
> it should be logged or silently ignore and the request dropped?
>
> Massimo
>
>
> On Monday, 16 July 2012 10:00:14 UTC-5, Bruce Wade wrote:
>>
>> I am using the latest stable still.
>>
>> On Mon, Jul 16, 2012 at 7:58 AM, Massimo Di Pierro <
>> massimo.dipie...@gmail.com> wrote:
>>
>>> Which web2py version? The error is from copying the request body
>>> into a tmp object in web2py. Looks like the request declares a size in 
>>> the
>>> header but it is shorter (truncated).
>>>
>>>
>>>
>>> On Friday, 13 July 2012 16:27:51 UTC-5, Brian M wrote:

 I'm having ongoing problems with IOErrors from one of my web2py
 apps deployed on Windows with Apache & mod_wsgi.  Looks to me like the
 error maybe happening at a lower level before it even gets to my app 
 code?

 Traceback (most recent call last):
 File "C:\\dashboard\\web2py\\gluon\**\main.py", line 447, in
 wsgibase
 parse_get_post_vars(request, environ)
 File "C:\\dashboard\\web2py\\gluon\**\main.py", line 275, in
 parse_get_post_vars
 request.body = copystream_progress(request) ### stores request body
 File "C:\\dashboard\\web2py\\gluon\**\main.py", line 143, in
 copystream_progress
 copystream(source, dest, size, chunk_size)
 File "C:\\dashboard\\web2py\\gluon\**\fileutils.py", line 374,
 in copystream
 data = src.read(size)
 IOError: request data read error

>>>
>>
>>
>> --
>> --
>> Regards,
>> Bruce Wade
>> http://ca.linkedin.com/in/**bruc**elwade
>> http://www.wadecybertech.com
>> http://www.fittraineronline.**co**m - 
>> Fitness Personal Trainers Online
>> http://www.warplydesigned.com
>>
>>

>>  --
>
>
>
>



-- 
-- 
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com
http://www.fittraineronline.com - Fitness Personal Trainers Online
http://www.warplydesigned.com

-- 





Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Niphlod
I'm storing sessions on database for my app with no apparent problems 
(1.99.7 stable) for storing them in redis, currently there is no way 
(sorry). 
When I implemented cache in redis it seemed that I was the only one using a 
redis stack along web2py...generally redis adoption is quite sparse in 
web2py world, and the only implemented thing is the cache backend.
Anyway if there are demands in this sense, I could write something up, but 
some changes to how sessions are handled in web2py (namely in 
gluon.main.wsgibase) are needed.



On Monday, July 16, 2012 6:58:54 PM UTC+2, rochacbruno wrote:
>
>
> I tested putting sessions in database, but for some strange reason, when 
> sessions are in db, user are not redirect to login._next after the login, 
> and other issues. Also I think sessions in db gets a bit slower.
>
> I am planning to test sessions in redis.
>
>
> On Mon, Jul 16, 2012 at 1:01 PM, Bruce Wade  wrote:
>
>> That I/o warning shouldn't take down your site I have the same issue with 
>> linode. I think sessions need to be done differently especially on high 
>> load sites with a load balancer sometimes I find over 400,000 files in the 
>> session folder on each server × 4
>>  On Jul 16, 2012 8:14 AM, "Bruno Rocha"  wrote:
>>
>>> I am having a related problem.
>>>
>>> "Your Linode, blouserver, has exceeded the notification threshold 
>>> (1000) for disk io rate by averaging 1382.77 for the last 2 hours: 
>>>
>>> I receive this message every 2 hour, so my nginx get bas gateway and I 
>>> need to do "rm sessions/* " and also  "/etc/init.d/uwsgi restart" to get 
>>> the site running again.
>>>
>>>
>>>
>>> On Mon, Jul 16, 2012 at 12:07 PM, Massimo Di Pierro <
>>> massimo.dipie...@gmail.com> wrote:
>>>
 This may be related to a bug in rocket that was not catching 
 timouterror and occasionally sending/receiving incomplete requests.

 Try upgrade rocket.py yo trunk. You can leave everything unchanged. Let 
 us know if the error go away.

 It is also possible that the request is actually invalid (the browser 
 declares a different size than it sends). Perhaps because of network 
 issues. Perhaps web2py could report a better (clearer error). Do you think 
 it should be logged or silently ignore and the request dropped?

 Massimo


 On Monday, 16 July 2012 10:00:14 UTC-5, Bruce Wade wrote:
>
> I am using the latest stable still.
>
> On Mon, Jul 16, 2012 at 7:58 AM, Massimo Di Pierro <
> massimo.dipie...@gmail.com> wrote:
>
>> Which web2py version? The error is from copying the request body into 
>> a tmp object in web2py. Looks like the request declares a size in the 
>> header but it is shorter (truncated).
>>
>>
>>
>> On Friday, 13 July 2012 16:27:51 UTC-5, Brian M wrote:
>>>
>>> I'm having ongoing problems with IOErrors from one of my web2py apps 
>>> deployed on Windows with Apache & mod_wsgi.  Looks to me like the error 
>>> maybe happening at a lower level before it even gets to my app code?
>>>
>>> Traceback (most recent call last):
>>> File "C:\\dashboard\\web2py\\gluon\\main.py", line 447, in 
>>> wsgibase
>>> parse_get_post_vars(request, environ)
>>> File "C:\\dashboard\\web2py\\gluon\\main.py", line 275, in 
>>> parse_get_post_vars
>>> request.body = copystream_progress(request) ### stores request body
>>> File "C:\\dashboard\\web2py\\gluon\\main.py", line 143, in 
>>> copystream_progress
>>> copystream(source, dest, size, chunk_size)
>>> File "C:\\dashboard\\web2py\\gluon\\fileutils.py", line 374, in 
>>> copystream
>>> data = src.read(size)
>>> IOError: request data read error
>>>
>>
>
>
> -- 
> -- 
> Regards,
> Bruce Wade
> http://ca.linkedin.com/in/**brucelwade
> http://www.wadecybertech.com
> http://www.fittraineronline.**com  - 
> Fitness Personal Trainers Online
> http://www.warplydesigned.com
>
>
>>>  
>

-- 





Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Bruno Rocha
I tested putting sessions in database, but for some strange reason, when
sessions are in db, user are not redirect to login._next after the login,
and other issues. Also I think sessions in db gets a bit slower.

I am planning to test sessions in redis.


On Mon, Jul 16, 2012 at 1:01 PM, Bruce Wade  wrote:

> That I/o warning shouldn't take down your site I have the same issue with
> linode. I think sessions need to be done differently especially on high
> load sites with a load balancer sometimes I find over 400,000 files in the
> session folder on each server × 4
>  On Jul 16, 2012 8:14 AM, "Bruno Rocha"  wrote:
>
>> I am having a related problem.
>>
>> "Your Linode, blouserver, has exceeded the notification threshold (1000)
>> for disk io rate by averaging 1382.77 for the last 2 hours:
>>
>> I receive this message every 2 hour, so my nginx get bas gateway and I
>> need to do "rm sessions/* " and also  "/etc/init.d/uwsgi restart" to get
>> the site running again.
>>
>>
>>
>> On Mon, Jul 16, 2012 at 12:07 PM, Massimo Di Pierro <
>> massimo.dipie...@gmail.com> wrote:
>>
>>> This may be related to a bug in rocket that was not catching timouterror
>>> and occasionally sending/receiving incomplete requests.
>>>
>>> Try upgrade rocket.py yo trunk. You can leave everything unchanged. Let
>>> us know if the error go away.
>>>
>>> It is also possible that the request is actually invalid (the browser
>>> declares a different size than it sends). Perhaps because of network
>>> issues. Perhaps web2py could report a better (clearer error). Do you think
>>> it should be logged or silently ignore and the request dropped?
>>>
>>> Massimo
>>>
>>>
>>> On Monday, 16 July 2012 10:00:14 UTC-5, Bruce Wade wrote:

 I am using the latest stable still.

 On Mon, Jul 16, 2012 at 7:58 AM, Massimo Di Pierro <
 massimo.dipie...@gmail.com> wrote:

> Which web2py version? The error is from copying the request body into
> a tmp object in web2py. Looks like the request declares a size in the
> header but it is shorter (truncated).
>
>
>
> On Friday, 13 July 2012 16:27:51 UTC-5, Brian M wrote:
>>
>> I'm having ongoing problems with IOErrors from one of my web2py apps
>> deployed on Windows with Apache & mod_wsgi.  Looks to me like the error
>> maybe happening at a lower level before it even gets to my app code?
>>
>> Traceback (most recent call last):
>> File "C:\\dashboard\\web2py\\gluon\\main.py", line 447, in
>> wsgibase
>> parse_get_post_vars(request, environ)
>> File "C:\\dashboard\\web2py\\gluon\\main.py", line 275, in
>> parse_get_post_vars
>> request.body = copystream_progress(request) ### stores request body
>> File "C:\\dashboard\\web2py\\gluon\\main.py", line 143, in
>> copystream_progress
>> copystream(source, dest, size, chunk_size)
>> File "C:\\dashboard\\web2py\\gluon\\fileutils.py", line 374, in
>> copystream
>> data = src.read(size)
>> IOError: request data read error
>>
>


 --
 --
 Regards,
 Bruce Wade
 http://ca.linkedin.com/in/**brucelwade
 http://www.wadecybertech.com
 http://www.fittraineronline.**com  -
 Fitness Personal Trainers Online
 http://www.warplydesigned.com


>>


Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Bruce Wade
That I/o warning shouldn't take down your site I have the same issue with
linode. I think sessions need to be done differently especially on high
load sites with a load balancer sometimes I find over 400,000 files in the
session folder on each server × 4
On Jul 16, 2012 8:14 AM, "Bruno Rocha"  wrote:

> I am having a related problem.
>
> "Your Linode, blouserver, has exceeded the notification threshold (1000)
> for disk io rate by averaging 1382.77 for the last 2 hours:
>
> I receive this message every 2 hour, so my nginx get bas gateway and I
> need to do "rm sessions/* " and also  "/etc/init.d/uwsgi restart" to get
> the site running again.
>
>
>
> On Mon, Jul 16, 2012 at 12:07 PM, Massimo Di Pierro <
> massimo.dipie...@gmail.com> wrote:
>
>> This may be related to a bug in rocket that was not catching timouterror
>> and occasionally sending/receiving incomplete requests.
>>
>> Try upgrade rocket.py yo trunk. You can leave everything unchanged. Let
>> us know if the error go away.
>>
>> It is also possible that the request is actually invalid (the browser
>> declares a different size than it sends). Perhaps because of network
>> issues. Perhaps web2py could report a better (clearer error). Do you think
>> it should be logged or silently ignore and the request dropped?
>>
>> Massimo
>>
>>
>> On Monday, 16 July 2012 10:00:14 UTC-5, Bruce Wade wrote:
>>>
>>> I am using the latest stable still.
>>>
>>> On Mon, Jul 16, 2012 at 7:58 AM, Massimo Di Pierro <
>>> massimo.dipie...@gmail.com> wrote:
>>>
 Which web2py version? The error is from copying the request body into a
 tmp object in web2py. Looks like the request declares a size in the header
 but it is shorter (truncated).



 On Friday, 13 July 2012 16:27:51 UTC-5, Brian M wrote:
>
> I'm having ongoing problems with IOErrors from one of my web2py apps
> deployed on Windows with Apache & mod_wsgi.  Looks to me like the error
> maybe happening at a lower level before it even gets to my app code?
>
> Traceback (most recent call last):
> File "C:\\dashboard\\web2py\\gluon\\main.py", line 447, in
> wsgibase
> parse_get_post_vars(request, environ)
> File "C:\\dashboard\\web2py\\gluon\\main.py", line 275, in
> parse_get_post_vars
> request.body = copystream_progress(request) ### stores request body
> File "C:\\dashboard\\web2py\\gluon\\main.py", line 143, in
> copystream_progress
> copystream(source, dest, size, chunk_size)
> File "C:\\dashboard\\web2py\\gluon\\fileutils.py", line 374, in
> copystream
> data = src.read(size)
> IOError: request data read error
>

>>>
>>>
>>> --
>>> --
>>> Regards,
>>> Bruce Wade
>>> http://ca.linkedin.com/in/**brucelwade
>>> http://www.wadecybertech.com
>>> http://www.fittraineronline.**com  -
>>> Fitness Personal Trainers Online
>>> http://www.warplydesigned.com
>>>
>>>
>


Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Bruno Rocha
I am having a related problem.

"Your Linode, blouserver, has exceeded the notification threshold (1000)
for disk io rate by averaging 1382.77 for the last 2 hours:

I receive this message every 2 hour, so my nginx get bas gateway and I need
to do "rm sessions/* " and also  "/etc/init.d/uwsgi restart" to get the
site running again.



On Mon, Jul 16, 2012 at 12:07 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> This may be related to a bug in rocket that was not catching timouterror
> and occasionally sending/receiving incomplete requests.
>
> Try upgrade rocket.py yo trunk. You can leave everything unchanged. Let us
> know if the error go away.
>
> It is also possible that the request is actually invalid (the browser
> declares a different size than it sends). Perhaps because of network
> issues. Perhaps web2py could report a better (clearer error). Do you think
> it should be logged or silently ignore and the request dropped?
>
> Massimo
>
>
> On Monday, 16 July 2012 10:00:14 UTC-5, Bruce Wade wrote:
>>
>> I am using the latest stable still.
>>
>> On Mon, Jul 16, 2012 at 7:58 AM, Massimo Di Pierro <
>> massimo.dipie...@gmail.com> wrote:
>>
>>> Which web2py version? The error is from copying the request body into a
>>> tmp object in web2py. Looks like the request declares a size in the header
>>> but it is shorter (truncated).
>>>
>>>
>>>
>>> On Friday, 13 July 2012 16:27:51 UTC-5, Brian M wrote:

 I'm having ongoing problems with IOErrors from one of my web2py apps
 deployed on Windows with Apache & mod_wsgi.  Looks to me like the error
 maybe happening at a lower level before it even gets to my app code?

 Traceback (most recent call last):
 File "C:\\dashboard\\web2py\\gluon\\main.py", line 447, in wsgibase
 parse_get_post_vars(request, environ)
 File "C:\\dashboard\\web2py\\gluon\\main.py", line 275, in
 parse_get_post_vars
 request.body = copystream_progress(request) ### stores request body
 File "C:\\dashboard\\web2py\\gluon\\main.py", line 143, in
 copystream_progress
 copystream(source, dest, size, chunk_size)
 File "C:\\dashboard\\web2py\\gluon\\fileutils.py", line 374, in
 copystream
 data = src.read(size)
 IOError: request data read error

>>>
>>
>>
>> --
>> --
>> Regards,
>> Bruce Wade
>> http://ca.linkedin.com/in/**brucelwade
>> http://www.wadecybertech.com
>> http://www.fittraineronline.**com  -
>> Fitness Personal Trainers Online
>> http://www.warplydesigned.com
>>
>>


Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Massimo Di Pierro
This may be related to a bug in rocket that was not catching timouterror 
and occasionally sending/receiving incomplete requests.

Try upgrade rocket.py yo trunk. You can leave everything unchanged. Let us 
know if the error go away.

It is also possible that the request is actually invalid (the browser 
declares a different size than it sends). Perhaps because of network 
issues. Perhaps web2py could report a better (clearer error). Do you think 
it should be logged or silently ignore and the request dropped?

Massimo

On Monday, 16 July 2012 10:00:14 UTC-5, Bruce Wade wrote:
>
> I am using the latest stable still.
>
> On Mon, Jul 16, 2012 at 7:58 AM, Massimo Di Pierro <
> massimo.dipie...@gmail.com> wrote:
>
>> Which web2py version? The error is from copying the request body into a 
>> tmp object in web2py. Looks like the request declares a size in the header 
>> but it is shorter (truncated).
>>
>>
>>
>> On Friday, 13 July 2012 16:27:51 UTC-5, Brian M wrote:
>>>
>>> I'm having ongoing problems with IOErrors from one of my web2py apps 
>>> deployed on Windows with Apache & mod_wsgi.  Looks to me like the error 
>>> maybe happening at a lower level before it even gets to my app code?
>>>
>>> Traceback (most recent call last):
>>> File "C:\\dashboard\\web2py\\gluon\**\main.py", line 447, in wsgibase
>>> parse_get_post_vars(request, environ)
>>> File "C:\\dashboard\\web2py\\gluon\**\main.py", line 275, in 
>>> parse_get_post_vars
>>> request.body = copystream_progress(request) ### stores request body
>>> File "C:\\dashboard\\web2py\\gluon\**\main.py", line 143, in 
>>> copystream_progress
>>> copystream(source, dest, size, chunk_size)
>>> File "C:\\dashboard\\web2py\\gluon\**\fileutils.py", line 374, in 
>>> copystream
>>> data = src.read(size)
>>> IOError: request data read error
>>>
>>
>
>
> -- 
> -- 
> Regards,
> Bruce Wade
> http://ca.linkedin.com/in/brucelwade
> http://www.wadecybertech.com
> http://www.fittraineronline.com - Fitness Personal Trainers Online
> http://www.warplydesigned.com
>
>

Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Bruce Wade
I am using the latest stable still.

On Mon, Jul 16, 2012 at 7:58 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> Which web2py version? The error is from copying the request body into a
> tmp object in web2py. Looks like the request declares a size in the header
> but it is shorter (truncated).
>
>
>
> On Friday, 13 July 2012 16:27:51 UTC-5, Brian M wrote:
>>
>> I'm having ongoing problems with IOErrors from one of my web2py apps
>> deployed on Windows with Apache & mod_wsgi.  Looks to me like the error
>> maybe happening at a lower level before it even gets to my app code?
>>
>> Traceback (most recent call last):
>> File "C:\\dashboard\\web2py\\gluon\**\main.py", line 447, in wsgibase
>> parse_get_post_vars(request, environ)
>> File "C:\\dashboard\\web2py\\gluon\**\main.py", line 275, in
>> parse_get_post_vars
>> request.body = copystream_progress(request) ### stores request body
>> File "C:\\dashboard\\web2py\\gluon\**\main.py", line 143, in
>> copystream_progress
>> copystream(source, dest, size, chunk_size)
>> File "C:\\dashboard\\web2py\\gluon\**\fileutils.py", line 374, in
>> copystream
>> data = src.read(size)
>> IOError: request data read error
>>
>


-- 
-- 
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com
http://www.fittraineronline.com - Fitness Personal Trainers Online
http://www.warplydesigned.com