cURL / Mailing Lists / curl-users / Single Mail


RE: Getting error code 28 on one non-existant file but 22 on another

From: Wayne Dawson <>
Date: Wed, 1 Jun 2005 09:27:20 -0700

I know what it means, but it doesn't make sense for that... Therer's no
reason for the timeout. There's no network condidtion for it to happen.
The file is smaall. The thing is that it doesn't exist. A file with
that name *could* exist, but yesterday there ws no such file. I should
have got error 22.

I did get error 22 when I tried to get the other style of filename, that
also didn't exist.

This may sound weird, and I tried to explain it, but maybe it wasn't too

I have almost every day a file, ctaschq.dat. It's possible to have
ctaschq_1.dat,.._2,.._3,... Similarly, on a monthend I have another
file, AccountExtractYYYY-MM-DD.csv. It's possible to have
AccountExtractYYYY-MM-DD_1.csv, ..._2.csv, ..._3.csv. I have no way of
knowing in advance whether the _N files will exist.

My script tries to download them in a loop, and the loop continues until
the return code is not zero. If it's not zero or 22, I send the
monitoring program the error message.

Yesterday, while both the normal ctaschq.dat and
AccountExtractYYYY-MM-DD.csv were there -- neither ctaschq_1.dat nor
AccountExtractYYYY-MM-DD_1.csv existed on the site.

When the script tried to download these it returned error 22 for the
former and error 28 for the latter. I see no reason for a error 28
(timeout) to have occurred. I checked the site to make sure there was no
"extra" files. As far as I can see, I should have gotten 22 for both.

You'll have to take my word for it when I say there was no issues
connecting to the site.

Right now, it looks to me the long filename may be an issue, but that's
just a theory.

-----Original Message-----
[] On Behalf Of Ralph Mitchell
Sent: Tuesday, May 31, 2005 11:52 PM
To: curl tool talk
Subject: Re: Getting error code 28 on one non-existant file but 22 on

Error code 28 means:

   Operation timeout. The specified time-out period was reached
according to the conditions.

which I believe means that you set a timeout (either --connect-timeout
or --max-time) and it expires before the server responds, or completes
the response. How big is the file?? If you have --max-time set, is the
file so big that the timer could expire before the download completes??

Ralph Mitchell

On 6/1/05, Wayne Dawson <> wrote:
> Hi,
> This is my first post.
> Maybe someone can explain this to me.
> I'm using curl 7.13.2 (i386-pc-win32) with libcurl/7.13.2
> OpenSSL/0.9.7e
> zlib/1.2.1
> I have a script that tries to download a daily file called
> ctaschq.dat, also a monthly file called AccountExtractYYYY-MM-DD.csv,
> where YYYY-MM-DD would be the current date. The monthly file is
> produced on the last business day of the month, or the next business
day of following
> month if it's a weekend or holiday.
> It's also possible that there may be no files on a particular day or
> multiple files.
> If there are multiple files they are named like:
> ctaschq_N.dat or AccountExtractYYYY-MM-DD_N.csv, where N = {1, 2, 3
> ...}
> The way the script works, is it tries to download the file, say
> ctaschq.dat, and if there's been a download, a counter is set, and the

> script attempts to download ctaschq_1.dat, and so on. This continues
> until the error code returned is not 0.
> When it's not zero, it checks the error number and writes the message
> to the event log and also to an HP Openview monitoring application.
> Since a file may or may not be present, I don't consider error code 22

> (not
> found) an error, and don't display it on Openview.
> What I found today when this ran (the first time there was a monthly
> file) was that the error code 22 (not found) was returned for
> ctaschq_1.dat, but for AccountExtract2005-05-31_1.csv, I get error
code 28 (timeout).
> The problem with this error code 28 is that I consider a timeout an
> error condition and report it as such.
> I see no reason why it would return this error code instead of 22.
> There's definitely no such file on the remote server, as I logged in
> manually and checked.
> Can anyone shed any light on this?

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error, please delete this email from your system.
Received on 2005-06-01