Discussion:
IOCP: ReadFile() - strange error ? ERROR_WORKING_SET_QUOTA
(too old to reply)
Cult
2003-12-05 23:37:44 UTC
Permalink
ReadFile () after a returns error 1453 -" ERROR_WORKING_SET_QUOTA"


I start the erver, and is receving lots of data - after a while the
errormessage shows up, and i kill the connection (due to the error) i can
then reconnect - and then its running fine...for some time, until the error
pops back again.

Do anybody know that this errormessage means ? i have looked on the
newsgroup and on Microsoft - but its not very clear; do any of you have
experienced this problem during development/testing of your servers ?
SenderX
2003-12-06 03:06:35 UTC
Permalink
Post by Cult
ReadFile () after a returns error 1453 -" ERROR_WORKING_SET_QUOTA"
Are you using ReadFile for socket io?

Use WSARecv and WSASend...
--
The designer of the experimental, SMP and HyperThread friendly, AppCore
library.

http://AppCore.home.comcast.net
Cult
2003-12-06 06:37:05 UTC
Permalink
"SenderX"
Post by SenderX
Are you using ReadFile for socket io?
Use WSARecv and WSASend...
Okay, have just changed so im using WSARecv and WSASend, and going to
perform test now.

Curiousity: Whats the reason that WSAxxxx is so much more preferable than
Write/ReadFile() ?
Alun Jones [MS MVP]
2003-12-12 21:59:40 UTC
Permalink
Post by Cult
Curiousity: Whats the reason that WSAxxxx is so much more preferable than
Write/ReadFile() ?
Because sockets aren't files. File routines will give you file errors that
you then have to figure out what the network errors behind them might have
been. Network routines will give you network errors.

For similar reasons, don't use an empty select() call as a general-purpose
timer.

Alun.
~~~~

[Please don't email posters, if a Usenet response is appropriate.]
--
Texas Imperial Software | Find us at http://www.wftpd.com or email
1602 Harvest Moon Place | ***@texis.com.
Cedar Park TX 78613-1419 | WFTPD, WFTPD Pro are Windows FTP servers.
Fax/Voice +1(512)258-9858 | Try our NEW client software, WFTPD Explorer.
Cult
2003-12-06 07:00:49 UTC
Permalink
Post by SenderX
Use WSARecv and WSASend...
Ok now i errors that give some meaning:

After a while with WSAsend the application ends with a:

Error: 10054 WSAECONNRESET

And right after a:

Error: 10055 WSAENOBUFS (probably this isnt that important, since the
connection is closed).

In my test i am sending streaming data from SocketA to SocketB - and it is
SocketB that returns the error.

I have some kind of idea that this might be something to do with buffer ?
that the client isnt able to cope with all the data im sending to it ? maybe
outstanding's in the IOCP queue ?

I dont shut down the client in any way - which would give meaning to the
WSACONNRESET - can it be something with buffers and the queue ?
Cult
2003-12-06 07:46:18 UTC
Permalink
Post by Cult
Error: 10055 WSAENOBUFS (probably this isnt that important, since the
connection is closed).
Think this is more important that i first thought; during really hard test
on the application, this is the errormessage which come continously after i
have sent X amount of data - it is coming in the WSArecv () of the socket
that suddenly closes down.

It appears to be either something about the nr of bytes im sending, or the
number of posted "WSArecv()'s".

......hopefully i can recreate the error very easy; but is it a queue
problem ? and how to avoid this ? and why is the connection being closed (by
someone...) ?
Cult
2003-12-06 14:52:12 UTC
Permalink
Well ive been around, there are a few hints on the newsgroups, and found
this article from MS - concering the 10054 on WCArecv():

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q263/8/23.ASP&NoWebContent=1

But i really dont understand what this new code should do ? and if it is the
same problem i experience..

I have also seen posts about number of connections which could cause this
problem - if the backlog and nr. of acceptex'es couldnt handle incoming
connections - but in my example, i only have 2 connections, so it cannot be
that.

But i find it strange that the connection is shut down - i am pretty sure
its the serverside that is causing this, because i have tried with different
client programs, and also an ordinary telnet-client, and the situation is
the same every time.

Its straaaange.....
Cult
2003-12-06 15:30:15 UTC
Permalink
http://groups.google.dk/groups?hl=da&lr=&ie=UTF-8&oe=UTF-8&threadm=eONSz3ivCHA.1620%40TK2MSFTNGP11&rnum=2&prev=/groups%3Fhl%3Dda%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26q%3D10055%2Bwsarecv


Okay, i seem to find something that is similar to my problem here (cc.
10055) -

"increase your winsock buffer?" how do i do that ?
Cult
2003-12-06 17:39:04 UTC
Permalink
Well you might wonder whats going on, im posting to myself - but just keeps
updating what my test shows and what i might find on the net - so well the
last post here is the updated progress:

Anyway it seems like the error:
10054 WSAECONNRESET

Was my own doing, since i closed the connection when i get the error - so
the outstanding problem - and the real issue - is is now only the:

10055 WSAENOBUFS

At the moment it happens consequently when i have from 12300-12900 bytes
written / read - i dont know if it has anything with the reason yet.

But there is some articles on the net about this error, so im going to read
now.
Cult
2003-12-07 05:41:26 UTC
Permalink
Well - alot of reading, and still no answer to this problem :(

The MSDN documentation:
"No buffer space available. An operation on a socket could not be
performed because the system lacked sufficient buffer space or because a
queue was full. "

Well they are probably right - but what queue ??

The Newsgroups says, that it can be a problem with nr. of active
connections, but i have only 2 :( - someone says it can be that reading &
writing is going to fast - ive made changes in the test, so there is posted
data very slow - and i get the error at "exact" the same place as when im
pumping data through.

Changing the sockopt() and the SND + RCV _BUFF doesnt matter - changing the
listening port doesnt help.

In my test my testclient (socketA) is sending datapackets of 5 bytes - and
sends theese to another active socket (socketB).

A thing i have just found out now, is that i can avoid getting the error, if
i dont reroute the data from SocketA -> SocketB - so if the application is
just reading data, then it can do that for ever.

As soon as i ask the application to process the reacv()'s as sends() to
SocketB - THEN i have the error after app. 2500 packets of 5 bytes ?

I have a gut feeling that the "queue" that is full - has something to do
with the IOCP ? could it be that there is stuffed elements of
notifications - and that this is the queue-problem ? is there any way of
checking how many pending operations there is on the IOC-port "queue" (if
there exists such a queue).

Im getting old here .... :)
Cult
2003-12-08 06:31:03 UTC
Permalink
No one ? :( .......... i miss SenderX.
Alun Jones [MS MVP]
2003-12-12 21:59:41 UTC
Permalink
Post by Cult
The Newsgroups says, that it can be a problem with nr. of active
connections, but i have only 2 :( - someone says it can be that reading &
writing is going to fast - ive made changes in the test, so there is posted
data very slow - and i get the error at "exact" the same place as when im
pumping data through.
Pretty much the only time I've seen 10055, NOBUFS, is when you're trying to
connect or accept and there's no room (non-paged memory pool) for any more
sockets at the inn. Is it possible that you missed an error earlier on in a
connect() or accept() call?

How many other sockets are open on this system at the time?

Alun.
~~~~

[Please don't email posters, if a Usenet response is appropriate.]
--
Texas Imperial Software | Find us at http://www.wftpd.com or email
1602 Harvest Moon Place | ***@texis.com.
Cedar Park TX 78613-1419 | WFTPD, WFTPD Pro are Windows FTP servers.
Fax/Voice +1(512)258-9858 | Try our NEW client software, WFTPD Explorer.
Cult
2003-12-15 21:42:06 UTC
Permalink
11 open sockets (3 in my application, and 8 from other applications).

I dont miss any on connect() or acceptex() - i connect a telnetclient and a
client that sends burst of data, thats all.
Post by Alun Jones [MS MVP]
Pretty much the only time I've seen 10055, NOBUFS, is when you're trying to
connect or accept and there's no room (non-paged memory pool) for any more
sockets at the inn. Is it possible that you missed an error earlier on in a
connect() or accept() call?
How many other sockets are open on this system at the time?
Alun.
~~~~
Alun Jones [MS MVP]
2003-12-18 13:31:35 UTC
Permalink
Post by Cult
11 open sockets (3 in my application, and 8 from other applications).
That's very small - what does "netstat -a" say?

Alun.
~~~~

[Please don't email posters, if a Usenet response is appropriate.]
--
Texas Imperial Software | Find us at http://www.wftpd.com or email
1602 Harvest Moon Place | ***@texis.com.
Cedar Park TX 78613-1419 | WFTPD, WFTPD Pro are Windows FTP servers.
Fax/Voice +1(512)258-9858 | Try our NEW client software, WFTPD Explorer.
Loading...