469,599 Members | 2,732 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,599 developers. It's quick & easy.

connection hangs

I am using ftplib in some code that does exactly what you would expect.
It ftp's files. Its running inside a service running on windows xp
and windows 2003 servers, approximately 20 installations each
installation sends between 100 and 1000 files per day. Occasionally the
process will hang completely and the only way to restart the service is
to kill the pythonservice.exe (via End Process in Task Manager) service
and start it.

I have turned on the full debugging, ftpobject.debug(1), and redirected
that stdout to a file and when the process hangs i see hundreds of
identical lines (*cmd* 'TYPE I') in the debug files. See log except
below. This command i see is only executed in two places, during the
storbinary and retrbinary methods. When it hangs, it never gets a
response from the server and eventually locks up.

The connection does have a socket timeout of 10 seconds on the
connection, modifying the length of time has no affect on this issue.
Everything will work fine for weeks/months and then all of a sudden a
network issue will occur and the process will hang. The process ONLY
hangs when transferring over the internet, it has never happened on a
LAN connection, even when i have removed all connectivity from the FTP
server mid upload.

Has anyone ever seen this? or have any ideas how i could code around
it.
Thanks
Jeff

--- debug log ----
*resp* '227 Entering Passive Mode (##.##.##.##,173,244).'
*cmd* 'NLST *filematch*.xml'
*resp* '125 Data connection already open; Transfer starting.'
*resp* '226 Transfer complete.'
*cmd* 'USER username'
*resp* '331 Password required for username.'
*cmd* 'PASS ********'
*resp* '230 User username logged in.'
*cmd* 'TYPE I'
*resp* '200 Type set to I.'
*cmd* 'PASV'
*resp* '227 Entering Passive Mode (##.##.##.##,174,4).'
*cmd* u'STOR /path/to/filename.ext'
*resp* '125 Data connection already open; Transfer starting.'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
*cmd* 'TYPE I'
.... you get the idea

Jan 4 '07 #1
0 1096

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Paul Robinson | last post: by
1 post views Thread by Cliff Cooley | last post: by
reply views Thread by Michal Seidl | last post: by
6 posts views Thread by =?Utf-8?B?VGlt?= | last post: by
2 posts views Thread by Nicolas Le Gland | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.