2

I know, this question is asked here.

But, my question is related with windows azure server. I am in Free version of windows azure right now. I tried it with Shared version too. But, sometimes I am getting the same error for mysql connection.

ERROR

PHP Fatal error:  Uncaught exception 'PDOException' with message
'SQLSTATE[HY000] [1226] User 'username' has exceeded the
'max_user_connections' resource (current value: 4)'

How can I resolve this problem ? Do I need to increase number of instances in azure management portal? My website is in php.

Any kind of help will be appreciated. Thanks.

Community
  • 1
  • 1
RNK
  • 5,582
  • 11
  • 65
  • 133
  • what about closing a connection after using it? you can increase it like this... `connectionString="Server=XXX;Database=XXX;User Id=XXX;password=XXX; connection timeout=0; Max Pool Size = 500; Pooling = True"` – John Ruddell Jul 21 '14 at 21:35
  • You mean, Do I need to close connection after each query? – RNK Jul 21 '14 at 21:36
  • if you are creating a connection to the database for each query it seems like you should be able to streamline it to connect either once for a batch of queries or to close each connection after getting the result. also see this reference... http://stackoverflow.com/questions/16646846/sql-azure-connectivity-issue-after-concurrent-connections – John Ruddell Jul 21 '14 at 21:39
  • alright. Thanks. @John Ruddell – RNK Jul 21 '14 at 21:51
  • 1
    did that solve your issue? – John Ruddell Jul 21 '14 at 21:52
  • I need to work on caching in azure. o.w. I need to `unset` query object after each query in my project. – RNK Jul 21 '14 at 21:55
  • 1
    :) it'll make a better programmer out of you! – John Ruddell Jul 21 '14 at 21:58

0 Answers0