473,406 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 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 1312

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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.