Issue Details (XML | Word | Printable)

Key: CORE-3351
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Vlad Khorsun
Reporter: Vlad Khorsun
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Windows client could put 10054 error messages into firebird.log at connection time

Created: 15/Feb/11 10:05 AM   Updated: 23/Feb/11 07:47 AM
Component/s: Engine
Affects Version/s: 2.1.0, 2.0.4, 2.1.1, 2.0.5, 2.1.2, 2.1.3, 1.5.6, 2.0.6, 2.5.0
Fix Version/s: 2.5.1, 2.0.7, 2.1.5, 3.0 Alpha 1

Time Tracking:
Not Specified

Planning Status: Unspecified


 Description  « Hide
During tests with high load and simultaneous creation of many connections i found that firebriod.log contains a lot of INET errors such as

INET/inet_error: send errno = 10054

Debugging shows that in this condition it is possible to have successful call of connect() function followed by error in send() call.
No problems at server side was found.

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vlad Khorsun added a comment - 15/Feb/11 10:25 AM
Solution is to use SOMAXCONN as value for backlog parameter at call of listen().
Before value of 5 was hardcoded for call of listen().

MSDN said about backlog parameter :

Maximum length of the queue of pending connections. If set to SOMAXCONN, the underlying service provider responsible for socket s will set the backlog to a maximum reasonable value.

Note, that SOMAXCONN is still defined as 5 in winsock.h while at winsock2.h it is defined as 0x7fffffff
So it is correct and safe to use SOMAXCONN and to include winsock2.h instead of old winsock.h