472,374 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,374 software developers and data experts.

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 1219

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Paul Robinson | last post by:
I am developing a website in ASP that connects to a Sybase database. However, when I try to open a connection to the database the page will not load. The script does not timeout, nor the...
1
by: Cliff Cooley | last post by:
Can anybody suggest what may be causing the following problem ? I have an ASP script that opens a connection to an Oracle database using a DSN connection string, such as : Set dbConn=...
1
by: Davey | last post by:
I have an MS Access 2003 database that uses a SQL Server 2000 database as it's back-end. The database runs well most of the time but if the users dont use the database for a period of time (approx...
1
by: Eric Cathell | last post by:
I have a multithreaded application that is acting as a printserver. the printers area connected to the network via IP address using a symbol clientbridge. There are times that a printer may not be...
0
by: Michal Seidl | last post by:
Hi, I am trying to download data from remote ftp server connected through GSM modem. The speed is slow 1kB/s. Despite the classic linux ftp client works fine the ftp.retrbinary(),ftpretrlines()...
1
by: s_valmont | last post by:
Just wondering if anyone's heard of this issue. It relates to accessing an Oracle 9i database from ASP.NET 1.1. The first time you do this (e.g., run a sproc) it works fine. However doing this...
1
by: Mathijs | last post by:
Hi, I have a small Compact Framework tcpclient application (c#). This is my connection procedure: tcpclient = new TcpClient(ip, port); stream = tcpclient.GetStream(); Sent("HELLO");...
6
by: =?Utf-8?B?VGlt?= | last post by:
I have an app that calls a webmethod. Everything works fine except when you, the client, loses network connectivity during the request. When the connection is lost the client applications hangs. ...
2
by: Nicolas Le Gland | last post by:
Hello everyone here. This is my first post in this newsgroup, I hope I won't be to much off-topic. Feel free to redirect me to any better group. I am getting strange timing issues when...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.