Hi, I put in some additional log statements, and it seems that server_tls_readcb(), that is registered as an event callback in server_input(), is called in an endless loop.
I have figured out a way to reproduce the bug with two clicks, an will try to find the reason whether the event is fired too often, or whether the entry in the libevent queue is not removed correctly, so that it ends in an endless loop. Unfortunately I am new to C, so that it takes quite long for me to understand the code. Here is a log excerpt. The first two calls contain valid header informations, and all subsequent calls have size 0. server_tls_readcb server_read_http: session 1: size 624, to read -2 server_read_http: session 1: header 'GET: /administrator/index.php?option=com_menus&view=menus HTTP/1.1' server_read_http: session 1: header 'Host: jo1.example.com' server_read_http: session 1: header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:37.0) Gecko/20100101 Firefox/37.0' server_read_http: session 1: header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' server_read_http: session 1: header 'Accept-Language: en-US,en;q=0.5' server_read_http: session 1: header 'Accept-Encoding: gzip, deflate' server_read_http: session 1: header 'Referer: https://jo1.example.com/administrator/index.php?option=com_users&view=users' server_read_http: session 1: header 'Cookie: dfced3b8ef8245f626640a33... server_read_http: session 1: header 'Connection: keep-alive' server_response: /administrator/index.php server_tls_readcb server_read_http: session 1: size 624, to read -2 server_read_http: session 1: header 'GET: /administrator/index.php?option=com_menus&view=menus HTTP/1.1' server_read_http: session 1: header 'Host: jo1.example.com' server_read_http: session 1: header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:37.0) Gecko/20100101 Firefox/37.0' server_read_http: session 1: header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' server_read_http: session 1: header 'Accept-Language: en-US,en;q=0.5' server_read_http: session 1: header 'Accept-Encoding: gzip, deflate' server_read_http: session 1: header 'Referer: https://jo1.example.com/administrator/index.php?option=com_users&view=users' server_read_http: session 1: header 'Cookie: dfced3b8ef8245f626640a33bb1... server_read_http: session 1: header 'Connection: keep-alive' server_response: /administrator/index.php server_tls_readcb server_read_http: session 1: size 0, to read 0 server_response: /administrator/index.php server_tls_readcb server_read_http: session 1: size 0, to read -2 server_response: /administrator/index.php server_tls_readcb server_read_http: session 1: size 0, to read 0 server_response: /administrator/index.php server_tls_readcb server_read_http: session 1: size 0, to read -2 server_response: /administrator/index.php server_tls_readcb server_read_http: session 1: size 0, to read 0 server_response: /administrator/index.php server_tls_readcb server_read_http: session 1: size 0, to read -2 server_response: /administrator/index.php ... thanks, Alex. On Wed, May 06, 2015 at 04:37:05PM +0200, Antoine Jacoutot wrote: > On Wed, May 06, 2015 at 02:52:33PM +0200, Antoine Jacoutot wrote: > > On Wed, May 06, 2015 at 02:49:44PM +0200, Alex Greif wrote: > > > Hi, > > > > > > With the current snapshot on amd64 and have the following problem: > > > I am running httpd and php-fpm with a custom joomla (php) installation, > > > that crashes when I access the site with https. > > > Http runs fine without any problems. > > > > FWIW I have this exact same issue on a wordpress installation (httpd(8) > > with tls and php_fpm). > > I haven't had the time to look at it at all yet... but I just wanted to add > > a +1 > > Also happens with php-5.6... > > > > > > > > > > With https, php-fpm spawns the max number of max children, > > > and then never releases them. Finally httpd throws a 500 error. > > > > > > I cannot figure oy whether it is a httpd or a php-fpm problem, > > > but I understand the httpd webserver as s sort of proxy in front > > > of the fastcgi daemon. So I assume thet the problem is with httpd tls, > > > but I am really not sure. > > > > > > Here is my setup... > > > installed: httpd, php-5.6, php-fpm-5.6, postgresql > > > manually installed from tarball: joomla 3.4.1 > > > > > > The first https request works fine, but (in admin mode) switching between > > > the menus "User Manager" and "Menu Manager" triggers the error. > > > > > > my php-fpm.conf settings (I also used higher values, but this made no > > > difference): > > > > > > pm = dynamic > > > pm.max_children = 20 > > > pm.start_servers = 15 > > > pm.min_spare_servers = 10 > > > pm.max_spare_servers = 20 > > > > > > php-fpm spawns children gradually and then it is running permanently with > > > the max children. > > > Here are the logs from (/usr/local/sbin/php-fpm-5.6 -F -O) > > > > > > [06-May-2015 11:18:49.940744] DEBUG: pid 7845, > > > fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] > > > currently 20 active children, 0 spare children, 20 running children. > > > Spawning rate 1 > > > [06-May-2015 11:18:50.950807] DEBUG: pid 7845, > > > fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] > > > currently 20 active children, 0 spare children, 20 running children. > > > Spawning rate 1 > > > [06-May-2015 11:18:51.960904] DEBUG: pid 7845, > > > fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] > > > currently 20 active children, 0 spare children, 20 running children. > > > Spawning rate 1 > > > [06-May-2015 11:18:52.970830] DEBUG: pid 7845, > > > fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] > > > currently 20 active children, 0 spare children, 20 running children. > > > Spawning rate 1 > > > > > > my httpd.conf settings: > > > > > > server "jo1.example.com" { > > > listen on * port 80 > > > listen on * tls port 443 > > > > > > tls key "/etc/ssl/private/jo1.example.com.key" > > > tls certificate "/etc/ssl/jo1.example.com.crt" > > > > > > # Set max upload size to 513M (in bytes) > > > connection max request body 537919488 > > > > > > root "/jo1" > > > > > > directory { no auto index, index "index.php" } > > > > > > # Any other PHP file > > > location "*.php" { > > > fastcgi socket "/run/php-fpm.sock" > > > } > > > } > > > > > > Here are the last log messages from httpd (httpd -d -vvv) > > > > > > server jo1.example.com, client 3 (5 active), <ip>:42380 -> <ip>:443, > > > Connection refused (500 Internal Server Error) > > > server jo1.example.com, client 6 (2 active), <ip>:48145 -> <ip>, done > > > server jo1.example.com, client 4 (6 active), <ip>:48128 -> <ip>, done > > > server jo1.example.com, client 8 (5 active), <ip>:48142 -> <ip>, done > > > server jo1.example.com, client 9 (4 active), <ip>:48143 -> <ip>, done > > > server jo1.example.com, client 6 (4 active), <ip>:48137 -> <ip>, done > > > server jo1.example.com, client 5 (3 active), <ip>:48135 -> <ip>, done > > > jo1.example.com <ip> - - [06/May/2015:11:20:44 +0200] "<UNKNOWN> " 400 0 > > > server jo1.example.com, client 2 (3 active), <ip>:42379 -> <ip>:443, bad > > > request (400 Bad Request) > > > jo1.example.com <ip> - - [06/May/2015:11:20:44 +0200] "<UNKNOWN> " 400 0 > > > server jo1.example.com, client 1 (2 active), <ip>:42376 -> <ip>:443, bad > > > request (400 Bad Request) > > > jo1.example.com <ip> - - [06/May/2015:11:20:44 +0200] "<UNKNOWN> " 400 0 > > > server jo1.example.com, client 10 (1 active), <ip>:42402 -> <ip>:443, bad > > > request (400 Bad Request) > > > jo1.example.com <ip> - - [06/May/2015:11:20:44 +0200] "<UNKNOWN> " 400 0 > > > server jo1.example.com, client 1 (1 active), <ip>:42377 -> <ip>:443, bad > > > request (400 Bad Request) > > > jo1.example.com <ip> - - [06/May/2015:11:20:44 +0200] "<UNKNOWN> " 400 0 > > > server jo1.example.com, client 1 (2 active), <ip>:42375 -> <ip>:443, bad > > > request (400 Bad Request) > > > jo1.example.com <ip> - - [06/May/2015:11:20:44 +0200] "<UNKNOWN> " 400 0 > > > server jo1.example.com, client 2 (1 active), <ip>:42378 -> <ip>:443, bad > > > request (400 Bad Request) > > > > > > I am quite new to OpenBSD so an tips are appreciated how I can get more > > > logs or find the cause of the problem. > > > > > > Thanks, > > > Alex. > > > > > > > -- > > Antoine > > > > -- > Antoine

