mercredi 30 mai 2018

h2o web server shows "too many internal delegations"

help me

I want

  • use Laravel(php)
  • use php-fpm with fastcgi

env

  • Ubuntu 16
  • h2o version 2.3.0-DEV@5597dbe
  • OpenSSL: OpenSSL 1.1.0h 27 Mar 2018
  • mruby: YES

config

h2o.cfg

file.index: [ 'index.html', 'index.htm', 'index.txt', 'index.php' ]

file.custom-handler:
  extension: .php
  fastcgi.connect:
    port: /run/php/php7.2-fpm.sock
    type: unix



  "aaaa.com:443":
     listen:
       port: 443
       ssl:
         certificate-file: /etc/letsencrypt/live/aaaa.com/fullchain.pem
         key-file: /etc/letsencrypt/live/aaaa.com/privkey.pem
         cipher-suite: "EECDH+AESGCM:AES256+EECDH:AES128+EECDH"
         minimum-version: TLSv1.2
     paths:
       "/":
          file.dir: /path/to/public
          redirect:
             url: /index.php/
             internal: YES
#             internal: NO 
             status: 307

status

  • GET / -> run /index.php -> OK
  • GET /index.php/somefunc -> run index.php with somefunc -> OK
  • GET /somefunc -> browser shows error -> NG
  • set config to internal:NO and GET /somefunc -> 307 to /index.php/somefunc -> OK

error

browser shows

too many internal delegations

I did

I can't read/write c lang. but I did grep this error string,I fond it in lib/core/request.c.

    if (req->num_delegated == req->conn->ctx->globalconf->max_delegations) {
        /* TODO log */
        h2o_send_error_502(req, "Gateway Error", "too many internal delegations", 0);
        return;
    }

I add config

max-delegations: 10000000

and change source and make

    if (req->num_delegated == req->conn->ctx->globalconf->max_delegations) {
        /* TODO log */
         char buf[128];
         snprintf(buf, 128, "too many internal delegations %d", req->num_delegated);
        h2o_send_error_502(req, "Gateway Error", buf, 0);
        return;
    }

after this, browser shows

too many internal delegations 10000000

loop????

I want to know how to fix this situation...

please help me.




Aucun commentaire:

Enregistrer un commentaire