Hi All,
 
I am facing similar problem when uploading an packed appliation on to a 
remote server, the application size is 224 kb.
 
internet speed is good, i am able to work on Putty session without any 
issues.
 
Below patch link does not see to work. I am using stable release 1.99.7
 
Traceback (most recent call last):
File "/home/web2py/web2py/web2py/gluon/main.py", line 447, in wsgibase
    parse_get_post_vars(request, environ)
File "/home/web2py/web2py/web2py/gluon/main.py", line 275, in 
parse_get_post_vars
    request.body = copystream_progress(request) ### stores request body
File "/home/web2py/web2py/web2py/gluon/main.py", line 143, in 
copystream_progress
    copystream(source, dest, size, chunk_size)
File "/home/web2py/web2py/web2py/gluon/fileutils.py", line 376, in 
copystream
    data = src.read(chunk_size)
File "/usr/lib64/python2.6/socket.py", line 383, in read
    data = self._sock.recv(left)
timeout: timed out
 
Let me know if any of you had this problem and had a solution to it.
 
regards
Pradeep
 
 

On Sunday, November 6, 2011 5:12:09 PM UTC+5:30, fox wrote:

> Hi all, 
> we're developing a web2py application over a non reliable network 
> connection and we encountered some problems with file uploading that 
> made us going crazy. 
> We had the same error as: 
>
> http://markmail.org/message/vtduef55vy43zqsv#query:web2py%20socket%20timeout+page:1+mid:mhacsuphhsdxt43h+state:results
>  
> or 
> http://comments.gmane.org/gmane.comp.python.web2py/70636 
>
> The problem was always: 
> Traceback (most recent call last): 
>   File "/srv/web2py/gluon/main.py", line 442, in wsgibase 
>     parse_get_post_vars(request, environ) 
>   File "/srv/web2py/gluon/main.py", line 276, in parse_get_post_vars 
>     request.body = copystream_progress(request) ### stores request 
> body 
>   File "/srv/web2py/gluon/main.py", line 144, in copystream_progress 
>     copystream(source, dest, size, chunk_size) 
>   File "/srv/web2py/gluon/fileutils.py", line 366, in copystream 
>     data = src.read(chunk_size) 
>   File "/usr/lib/python2.6/socket.py", line 377, in read 
>     data = self._sock.recv(left) 
> timeout: timed out 
>
> We found out that tuning rocket setting SOCKET_TIMEOUT made everything 
> work. We changed that parameter from 1 second to 300 seconds. On a 
> test Tor Hidden Service we managed to upload more than 1.5GB without 
> any problem while with the default setting we had trouble even 
> uploading 4-5MB. 
>
>
> Here's the patch for web2py that adds the parameter --socket-timeout 
> and lets the user tweak this setting: 
>
> https://github.com/globaleaks/web2py/commit/75f84697c3db70c1f4da4550f1518ced879208ce
>  
>
> It would be great if this were merged to trunk so we don't have to 
> keep our own custom branch of web2py 
>
> Thank you ;) 
>
> -- 
>
> fox

-- 



Reply via email to