Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

MYSQL Connection Problem

Featured Replies

Hello all and thank you for taking the time to read this topic.

 

I have recently been working on a web application which has 2 ajax features that call back every 5 seconds to a PHP file requesting small text data from the MYSQL Database Table live in the web page.


The application is running locally with the latest version of apache,php and mysql downloaded and freshly installed a few days ago.

The problem happens when another computer on my network loads the web application and then after a 5 minute window we receive the error below on the website.

 

Warning: mysqli_connect(): (HY000/2002): An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.

Ive tried to close the connections right after each one is closed using the PHP mysqli_close() function but this did not fix the problem.

I then decided to connect to mysql process and show the connections status and this is what was displayed:

Untitled_1.jpg

Im a little confused at this as for each page refresh its making 65 connections which seems a bit to much... for every page refresh the "Connections" value is incremented Is this normal?


What could be the problem? Closing the website on the second computer stops us from getting the error above? Perhaps im making too many MYSQL requests?

Edited by NitroPhysix

I cannot say what the problem is because i myself have never ran into that issue but i can tell you that making a ton of mysql request should not cause the issue ive had sites that made such request every 1 sec with multiple people on the site for 30 mins or more and have never had such issues but i did some research and came up with this http://social.msdn.microsoft.com/forums/en-US/sqldataaccess/thread/efb0c4bd-389f-45d6-88eb-b2403e36d3b3 which may be of some help

  • Author

I cannot say what the problem is because i myself have never ran into that issue but i can tell you that making a ton of mysql request should not cause the issue ive had sites that made such request every 1 sec with multiple people on the site for 30 mins or more and have never had such issues but i did some research and came up with this http://social.msdn.microsoft.com/forums/en-US/sqldataaccess/thread/efb0c4bd-389f-45d6-88eb-b2403e36d3b3 which may be of some help

 

Thanks mate, will take a look.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.