Os arquivos de sessão são criados a cada 2 segundos. Executando no openshift Laravel PHP nginx haproxy

2

O que causa o acesso no servidor quando o servidor é iniciado?

Eu executei rhc tail no meu aplicativo para monitorar os novos registros.

Aqui está o meu log link

Quando iniciei o aplicativo usando rhc app-start

app-root/logs/php-fpm-error.log

[26-Jul-2016 21:53:00] NOTICE: [pool www] 'user' directive is ignored     
when FPM is not running as root
[26-Jul-2016 21:53:00] NOTICE: [pool www] 'group' directive is ignored
when FPM is not running as root
[26-Jul-2016 21:53:00] NOTICE: fpm is running, pid 33590
[26-Jul-2016 21:53:00] NOTICE: ready to handle connections

app-root/logs/haproxy.log

[WARNING] 207/215259 (33493) : config : log format ignored for proxy 'stats' since it has no log address.
[WARNING] 207/215259 (33493) : config : log format ignored for proxy 'express' since it has no log address.
[WARNING] 207/215259 (33493) : Server express/local-gear is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
[ALERT] 207/215259 (33493) : proxy 'express' has no server available!

app-root/logs/haproxy_ctld.log

I, [2016-07-26T21:52:59.962585 #33508]  INFO -- : Starting haproxy_ctld

nginx/logs/error.log

2016/07/26 21:53:03 [warn] 36575#0: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /var/lib/openshift/578775d489f5cf4fc100019f/nginx//conf/nginx.conf:2

app-root/logs/nginx_access.log

(my.sever.ip.address) - - [26/Jul/2016:21:53:06 -0400]  302 "GET / HTTP/1.0" 364 "-" "-" "-"
(my.sever.ip.address) - - [26/Jul/2016:21:53:08 -0400]  302 "GET / HTTP/1.0" 364 "-" "-" "-"
(my.sever.ip.address) - - [26/Jul/2016:21:53:10 -0400]  302 "GET / HTTP/1.0" 364 "-" "-" "-"

app-root/logs/haproxy.log

[WARNING] 207/215310 (33493) : Server express/local-gear is UP, reason: Layer7 check passed, code: 302, info: "HTTP status check returned code <3C>302<3E>", check duration: 69ms. 1 active and 0 backup servers online. 0 sessions requeued, 0 total in queue.

app-root/logs/nginx_access.log

(my.sever.ip.address) - - [26/Jul/2016:21:53:12 -0400]  302 "GET / HTTP/1.0" 364 "-" "-" "-"
(my.sever.ip.address) - - [26/Jul/2016:21:53:14 -0400]  302 "GET / HTTP/1.0" 364 "-" "-" "-"
(my.sever.ip.address) - - [26/Jul/2016:21:53:16 -0400]  302 "GET / HTTP/1.0" 364 "-" "-" "-"
(my.sever.ip.address) - - [26/Jul/2016:21:53:18 -0400]  302 "GET / HTTP/1.0" 364 "-" "-" "-"
(my.sever.ip.address) - - [26/Jul/2016:21:53:20 -0400]  302 "GET / HTTP/1.0" 364 "-" "-" "-"
(my.sever.ip.address) - - [26/Jul/2016:21:53:22 -0400]  302 "GET / HTTP/1.0" 364 "-" "-" "-"

então tento acessar meu diretório raiz do site

(my.sever.ip.address) - - [26/Jul/2016:21:53:24 -0400]  200 "GET /login HTTP/1.1" 1422 "-" "Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0" "(my.client.ip.address)"
(my.sever.ip.address) - - [26/Jul/2016:21:53:24 -0400]  302 "GET / HTTP/1.0" 364 "-" "-" "-"
(my.sever.ip.address) - - [26/Jul/2016:21:53:25 -0400]  200 "GET /components/AdminLTE/bootstrap/css/bootstrap.min.css HTTP/1.1" 23930 "http://dev-teleradportal.rhcloud.com/login" "Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0" "(my.client.ip.address)"
(my.sever.ip.address) - - [26/Jul/2016:21:53:25 -0400]  200 "GET /components/AdminLTE/plugins/font-awesome/css/font-awesome.min.css HTTP/1.1" 6734 "http://dev-teleradportal.rhcloud.com/login" "Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0" "(my.client.ip.address)"
... other assets

mas os logs continuam após o carregamento

(my.sever.ip.address) - - [26/Jul/2016:21:53:26 -0400]  302 "GET / HTTP/1.0" 364 "-" "-" "-"
(my.sever.ip.address) - - [26/Jul/2016:21:53:29 -0400]  302 "GET / HTTP/1.0" 364 "-" "-" "-"
(my.sever.ip.address) - - [26/Jul/2016:21:53:31 -0400]  302 "GET / HTTP/1.0" 364 "-" "-" "-"
(my.sever.ip.address) - - [26/Jul/2016:21:53:33 -0400]  302 "GET / HTTP/1.0" 364 "-" "-" "-"

Então eu executei o rhc app-stop para parar o servidor

estes são os logs após a execução de "stop"

app-root/logs/php-fpm-error.log

[26-Jul-2016 21:53:55] NOTICE: Terminating ...
[26-Jul-2016 21:53:55] NOTICE: exiting, bye-bye!

nginx/logs/error.log

2016/07/26 21:53:55 [warn] 37102#0: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /var/lib/openshift/578775d489f5cf4fc100019f/nginx//conf/nginx.conf:2
2016/07/26 21:53:55 [notice] 37102#0: signal process started

O access logs

    
por marlo 27.07.2016 / 05:37

1 resposta

4

O comportamento descrito corresponde às verificações de integridade http do haproxy. Novas sessões são criadas porque o haproxy não mantém cookies entre verificações de saúde, assim, seu aplicativo (Laravel) considera a solicitação a primeira solicitação de uma nova sessão de navegação.

Você pode reconfigurar seu URL de verificação de integridade para algo que não usa sessões para evitar a criação do arquivo da sessão, mas isso significaria que a verificação de integridade passaria mesmo que a funcionalidade da sessão fosse interrompida.

The "inter" parameter sets the interval between two consecutive health checks to milliseconds. If left unspecified, the delay defaults to 2000 ms.

Fonte: link

    
por 27.07.2016 / 06:42