Recientemente tengo un problema con el mySQL, aparentemente las conexiones se quedan "pegadas" en la cola de procesos y eso hace que los demás usuarios no puedan conectarse. Si reinicio el servicio se arregla momentáneamente o si no hago nada, al cabo de un rato se arregla también.
Mi cola de procesos tiene algo así:
Cita:
Como ven, hay procesos que están 397 segundos pegados y eso me parece que es lo que causa el problema; sin embargo en el mes y medio que llevo en el VPS no me había pasado, lo que me lleva a pensar que han modificado algo y no me lo quieren decir.mysql> show processlist;
+------+----------------+-----------+---------------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+------+----------------+-----------+---------------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+
| 2917 | vpsslash_slash | localhost | vpsslash_slasheaven | Query | 397 | Sending data | SELECT COUNT(DISTINCT author.uid) FROM fanfiction_authors as author LEFT JOIN fanfiction_stories as |
| 2919 | vpsslash_slash | localhost | vpsslash_slasheaven | Query | 394 | Locked | UPDATE fanfiction_stories SET count = count + 1 WHERE sid = '18563' LIMIT 1 |
| 2920 | vpsslash_slash | localhost | vpsslash_slasheaven | Query | 393 | Locked | SELECT stories.*, author.penname as penname, UNIX_TIMESTAMP(stories.date) as date, UNIX_TIMESTAMP(st |
| 2923 | vpsslash_slash | localhost | vpsslash_slasheaven | Query | 392 | Locked | SELECT stories.*, author.penname as penname, UNIX_TIMESTAMP(stories.date) as date, UNIX_TIMESTAMP(st |
| 2924 | vpsslash_slash | localhost | vpsslash_slasheaven | Query | 389 | Locked | SELECT count(sid) FROM fanfiction_stories as stories WHERE validated > 0 AND (FIND_IN_SET(15, storie |
+------+----------------+-----------+---------------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+------+----------------+-----------+---------------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+
| 2917 | vpsslash_slash | localhost | vpsslash_slasheaven | Query | 397 | Sending data | SELECT COUNT(DISTINCT author.uid) FROM fanfiction_authors as author LEFT JOIN fanfiction_stories as |
| 2919 | vpsslash_slash | localhost | vpsslash_slasheaven | Query | 394 | Locked | UPDATE fanfiction_stories SET count = count + 1 WHERE sid = '18563' LIMIT 1 |
| 2920 | vpsslash_slash | localhost | vpsslash_slasheaven | Query | 393 | Locked | SELECT stories.*, author.penname as penname, UNIX_TIMESTAMP(stories.date) as date, UNIX_TIMESTAMP(st |
| 2923 | vpsslash_slash | localhost | vpsslash_slasheaven | Query | 392 | Locked | SELECT stories.*, author.penname as penname, UNIX_TIMESTAMP(stories.date) as date, UNIX_TIMESTAMP(st |
| 2924 | vpsslash_slash | localhost | vpsslash_slasheaven | Query | 389 | Locked | SELECT count(sid) FROM fanfiction_stories as stories WHERE validated > 0 AND (FIND_IN_SET(15, storie |
No tenía un php.ini, de modo que puse uno y lo he configurado para el mySQL del siguiente modo:
Cita:
Sin embargo, el problema no se ha resuelto.[MySQL]
; Allow or prevent persistent links.
mysql.allow_persistent = Off
; Maximum number of persistent links. -1 means no limit.
mysql.max_persistent = 0
; Maximum number of links (persistent + non-persistent). -1 means no limit.
mysql.max_links = -1
; Default port number for mysql_connect(). If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
; at MYSQL_PORT.
mysql.default_port =
; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
mysql.default_socket =
; Default host for mysql_connect() (doesn't apply in safe mode).
mysql.default_host =
; Default user for mysql_connect() (doesn't apply in safe mode).
mysql.default_user =
; Default password for mysql_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
; and reveal this password! And of course, any users with read access to this
; file will be able to reveal the password as well.
mysql.default_password =
; Maximum time (in seconds) for connect timeout. -1 means no limit
mysql.connect_timeout = 60
; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
; SQL-Errors will be displayed.
mysql.trace_mode = Off
; Allow or prevent persistent links.
mysql.allow_persistent = Off
; Maximum number of persistent links. -1 means no limit.
mysql.max_persistent = 0
; Maximum number of links (persistent + non-persistent). -1 means no limit.
mysql.max_links = -1
; Default port number for mysql_connect(). If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
; at MYSQL_PORT.
mysql.default_port =
; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
mysql.default_socket =
; Default host for mysql_connect() (doesn't apply in safe mode).
mysql.default_host =
; Default user for mysql_connect() (doesn't apply in safe mode).
mysql.default_user =
; Default password for mysql_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
; and reveal this password! And of course, any users with read access to this
; file will be able to reveal the password as well.
mysql.default_password =
; Maximum time (in seconds) for connect timeout. -1 means no limit
mysql.connect_timeout = 60
; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
; SQL-Errors will be displayed.
mysql.trace_mode = Off
Yo estoy decidida a cambiar de hosting pero no quiero regalarles el mes y medio que ya pagué, de modo que me gustaría saber si hay algo más que pueda intentar respecto a la configuración.
Agradeceré cualquier ayuda.