![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM Client/Server » View Thread |
Messages 1 to 4 of 4 total |
![]() |
Mon, Dec 4 2006 12:19 AM | Permanent Link |
"Bern Rudisill" | Hello,
I am finally converting my application to client/server and I keep getting an ESocketError with message "Can't create new socket" error. Basically every time I have to connect to the server I create the session, database, tables and queries on the fly. When my program first starts up it has to pull about 50 setting from the server so in a very sort amount of time it is creating a session and a query, getting a setting, freeing the query and session then doing it all over again until all the settings are retrieved. Any Idea why I am getting this error? Bern -- |
Mon, Dec 4 2006 5:04 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Bern,
<< I am finally converting my application to client/server and I keep getting an ESocketError with message "Can't create new socket" error. Basically every time I have to connect to the server I create the session, database, tables and queries on the fly. When my program first starts up it has to pull about 50 setting from the server so in a very sort amount of time it is creating a session and a query, getting a setting, freeing the query and session then doing it all over again until all the settings are retrieved. Any Idea why I am getting this error? >> Are you sure that the session is being freed in each case ? It sounds like you're running out of available sockets. Also, why are you creating the session and query components each time ? I would suggest that you create a session once and use it for the entire conversation with the database server. DBISAM's database server is not a stateless server and isn't really intended to be used for rapid-fire connect/request/reply/disconnect sequences in terms of set-up and tear-down time for each sequence. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Dec 5 2006 7:15 AM | Permanent Link |
"Bern Rudisill" | Tim,
The main reason is for threads. Alot of the procedures that access the database can also be ran as a thread. So in order to be thread safe, like the instructions say, I have a unique session being created everytime the server needs to be accessed. Bern Tim Young [Elevate Software] wrote: > Bern, > > << I am finally converting my application to client/server and I keep > getting an ESocketError with message "Can't create new socket" error. > > Basically every time I have to connect to the server I create the > session, database, tables and queries on the fly. When my program > first starts up it has to pull about 50 setting from the server so in > a very sort amount of time it is creating a session and a query, > getting a setting, freeing the query and session then doing it all > over again until all the settings are retrieved. > > Any Idea why I am getting this error? >> > > Are you sure that the session is being freed in each case ? It > sounds like you're running out of available sockets. Also, why are > you creating the session and query components each time ? I would > suggest that you create a session once and use it for the entire > conversation with the database server. DBISAM's database server is > not a stateless server and isn't really intended to be used for > rapid-fire connect/request/reply/disconnect sequences in terms of > set-up and tear-down time for each sequence. -- |
Tue, Dec 5 2006 3:53 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Bern,
<< The main reason is for threads. Alot of the procedures that access the database can also be ran as a thread. So in order to be thread safe, like the instructions say, I have a unique session being created everytime the server needs to be accessed. >> Most likely the cause is this: http://groups.google.com/group/comp.lang.java.programmer/msg/16c0251eb7bfddf0 -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, August 14, 2024 at 07:31 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |