Welcome! Log In Create A New Profile

Advanced

php-fpm randomly becomes unresponsive, segfaults

Posted by c2h5oh 
Juan Fco. Giordana
Re: php-fpm randomly becomes unresponsive, segfaults
April 26, 2010 01:12PM
On 04/26/2010 05:38 AM, Jérôme Loyet wrote:
> Your stack trace shows a problem in the mysql library. But there is
> not more informations about the previous calls. Maybe you can try to
> compile PHP with --enable-debug to have a better stack trace. Or try
> to use another mysql library ... I don't really know how to help you

Yeah,

Try to compile PHP with the mysql native driver instead:

--with-mysql=mysqlnd \
--with-mysql-sock=/srv/var/run/mysqld/mysql.sock \
--with-mysqli=mysqlnd \
--enable-pdo \
--with-pdo-mysql=mysqlnd \


--
Subscription settings: http://groups.google.com/group/highload-php-en/subscribe?hl=en
Re: php-fpm randomly becomes unresponsive, segfaults
September 07, 2010 03:44PM
I have similar problem. Sometimes php-fpm start to use so many resources.. and the vps is blocked. I can't login to it.
Restart of php-fpm resolves the problem but I can't see why it becomes.
Re: php-fpm randomly becomes unresponsive, segfaults
September 12, 2010 04:02AM
I found solution of this. I don't need to start many servers (childs), because they eat the memory. So for VPS with 640 MB, 7 childs are enough. If I start more, they start to eat the memory and the descibed situation occurs.
grigori
Re: php-fpm randomly becomes unresponsive, segfaults
September 12, 2010 09:22AM
On 12 сен, 11:02, "Teri" <nginx-fo...@nginx.us> wrote:
> I found solution of this. I don't need to start many servers (childs),
> because they eat the memory. So for VPS with 640 MB, 7 childs are
> enough. If I start more, they start to eat the memory and the descibed
> situation occurs.

I run 20 child processes and a MySQL with hash tables on a VPS with
256 MB RAM, serving 400k requests daily.
Neither FPM nor PHP uses "so many resources" - it's your scripts only.
Re: php-fpm randomly becomes unresponsive, segfaults
October 12, 2010 07:06PM
@c2h5oh did you ever solved the problem?

Jordi
Maciej Lisiewski
Re: php-fpm randomly becomes unresponsive, segfaults
October 12, 2010 07:36PM
> @c2h5oh did you ever solved the problem?
>
> Jordi
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?3,75656,139903#msg-139903
>

Yeah, actually it was MySQL connection limit.
For some reason php-fpm became unresponsive if it was unable to connect
to MySQL and failed to report that error.
My guess is that connection timeout was longer than php-fpm process
timeout and that's why error was never logged, but as for the reason why
child process that encountered this problem became unresponsive I have
no clue - I was trying to fix a problem on a live site so I was more
concentrated on fixing or working around the issue than pinpointing the
exact php-fpm problem.


--
Maciej Lisiewski
Re: php-fpm randomly becomes unresponsive, segfaults
October 12, 2010 07:39PM
I have a master/slave schema

My master shows this:

mysql> show variables like 'max_connections';
+-----------------+-------+
| max_connections | 2248 |
+-----------------+-------+

mysql> SHOW STATUS LIKE 'Max_used_connections';
+----------------------+-------+
| Max_used_connections | 274 |
+----------------------+-------+


slaves show this:

show variables like 'max_connections';
+-----------------+-------+
| max_connections | 200 |
+-----------------+-------+


SHOW STATUS LIKE 'Max_used_connections';
+----------------------+-------+
| Max_used_connections | 62 |
+----------------------+-------+

Any other guess?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 311
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready