Jump to content

Recommended Posts

Hi everyone,

 

I have written a script to do multiple connections with mssql server. To accomplish this I do mssql_connect(servername, username, pass, 1) in a loop which runs 50 times. But always after 25 iterations, my script fails to make a connection. I am doing this from APTANA IDE using the php5.3.3(CGI) plugin on my desktop.

 

Can someone please let me know what I am missing here?

 

Thanks,

Manish

Thanks MrAdam for the reply!

 

Following is some logging information:

 

For 25 iterations:

 

I don't get any warnings and mssql_get_last_message() gives "Changed database context to 'master'"

 

After 25 iterations:

 

I start getting a warning i.e.  mssql_connect() [<a href='function.mssql-connect'>function.mssql-connect</a>]: Unable to connect to server:'server name'

 

and mssql_get_last_message() gives "Changed database context to 'database name'"

 

 

Thanks

 

 

This is a remote server. I am not closing the connection in same loop as the whole purpose of script was to have multiple connections open but I just tried it now and it doesn't throw that error. I am trying to get hold of someone from network team to check if there is any connection limit imposed on servers.

 

Thanks for the suggestion!

I just heard from Network and they said there is no such limitation on server and the maximum concurrent users is set to 0 which means unlimited. Is there anything else you can think of? I just tried to connect to mysql as localhost and I was able to do more than 25 connections.

 

Thanks 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.