Bienvenido, Invitado
Nombre de Usuario: Contraseña: Recordarme
  • Página:
  • 1
  • 2

TEMA: [SOLVED] Close connection on database after 30 sec

[SOLVED] Close connection on database after 30 sec 9 años 8 meses ago #14619

  • Turdin
  • Avatar de Turdin
  • Offline
  • Observador
  • Mensajes: 21
  • Gracias recibidas 1
  • Karma: 1
Hello, I am having a problem with the database, when the users open a connection with database, they remain connected until database drops (max time:240sec), i think this isn't right.

So, i get a lot of open connections and the site crashes!!
Is there a way to close the connection after, hmmm, 30 sec or less?

Thanks, Andrew
Última Edición: 9 años 8 meses ago por Turdin.
El administrador ha desactivado la escritura pública.

Re: Close connection on database after 30 sec 9 años 8 meses ago #14620

  • JoniJnm
  • Avatar de JoniJnm
  • Offline
  • Administrador
  • Mensajes: 4579
  • Gracias recibidas 544
  • Karma: 160
Hi,

I have registered in your site. I was seeing the time for check if there are new messages:

When the com finishes the search, the connection is killed and then it opens a new. So, when the conn survives more of 240sec?

Apache shows any error? Can you past it here?
El administrador ha desactivado la escritura pública.

Re: Close connection on database after 30 sec 9 años 8 meses ago #14621

  • Turdin
  • Avatar de Turdin
  • Offline
  • Observador
  • Mensajes: 21
  • Gracias recibidas 1
  • Karma: 1
See here The database:


51 sec, but the process only die at 240sec (the max execution time of database)

Thanks
El administrador ha desactivado la escritura pública.

Re: Close connection on database after 30 sec 9 años 8 meses ago #14642

  • Turdin
  • Avatar de Turdin
  • Offline
  • Observador
  • Mensajes: 21
  • Gracias recibidas 1
  • Karma: 1
Any news?
Need something that i can help?

Thanks, Andrew
El administrador ha desactivado la escritura pública.

Re: Close connection on database after 30 sec 9 años 8 meses ago #14647

  • JoniJnm
  • Avatar de JoniJnm
  • Offline
  • Administrador
  • Mensajes: 4579
  • Gracias recibidas 544
  • Karma: 160
Are you sure that the problem is caused by Kide? In this table, the command is "Sleep". Why is sleeping? Because the ajax? I don't know what's the problem :(
El administrador ha desactivado la escritura pública.

Re: Close connection on database after 30 sec 9 años 8 meses ago #14648

  • Turdin
  • Avatar de Turdin
  • Offline
  • Observador
  • Mensajes: 21
  • Gracias recibidas 1
  • Karma: 1
I'm sure is kide, but not only kide, the another shoutbox have the same problem...
And another connection is open every refresh, so:
If my database have max 60 connections, and refresh time is 5 sec= 240/5,+- 44 connections after a time, so, 2 users can broke my site?

:(

Here in jonijnm you don't have this problem?
El administrador ha desactivado la escritura pública.

Re: Close connection on database after 30 sec 9 años 8 meses ago #14651

  • Turdin
  • Avatar de Turdin
  • Offline
  • Observador
  • Mensajes: 21
  • Gracias recibidas 1
  • Karma: 1
See here:
"These issues occur because of code that uses a persistent connection to the database. In PHP, this is done with mysql_pconnect"

rackerhacker.com/2007/05/20/mysql-connections-in-sleep-state/

Hmmm, the shoutbox uses the mysql_pconnec? Or it's a "joomla thing"?

Thanks
El administrador ha desactivado la escritura pública.

Re: Close connection on database after 30 sec 9 años 8 meses ago #14653

  • JoniJnm
  • Avatar de JoniJnm
  • Offline
  • Administrador
  • Mensajes: 4579
  • Gracias recibidas 544
  • Karma: 160
mysql_pconnect is not used in Joomla neither in Kide (maybe you use a plugin, but I think no).

I don't know... try to increase the time of refresh, in Kide conf. If the ploblem is not caused by Kide, maybe you should activate the cache in Joomla conf and use the plugin "System cache"
El administrador ha desactivado la escritura pública.

Re: Close connection on database after 30 sec 9 años 8 meses ago #14680

  • Turdin
  • Avatar de Turdin
  • Offline
  • Observador
  • Mensajes: 21
  • Gracias recibidas 1
  • Karma: 1
Hmm, i think the problem is with the module, because with the component the sleep doesn't go after 1 sec...
Maybe can be a javascript conflict, i'll try to install it in a clean site as test purpose.

But, until now... Any idea?

Thanks
El administrador ha desactivado la escritura pública.
  • Página:
  • 1
  • 2
Tiempo de carga de la página: 0.095 segundos