title: nginx+php-fpm runs slowly(It's very slow to open the page) in WSL
body: <p>I have this very strange problem.</p>
  <p>I install nginx and php-fpm in WSL</p>
  <p>Then I wrote it index.php The content is <code>&lt;? PHP echo 'hello world';</code></p>
  <p>Then open it through a browser</p>
  <p>It often runs more than 100s (php-fpm.ini <code>request_terminate_timeout</code> default value) before it has output</p>
  <p>But if I run <code>service php-fpm reload</code> in the WSL</p>
  <p>The page loads immediately</p>
  <p>Occasionally, however, pages can load normally and return content immediately.</p>
  <p>If i change <code>request_terminate_timeout</code>value to 4 in php-fpm.ini</p>
  <p>The page will load in 4 seconds</p>
  <p>If I try to access a static file, I always return quickly.</p>
  <p>I try to run <code>php index.php</code> in shell</p>
  <p>It always returns content quickly</p>
  <p>Besides, I found the problem</p>
  <p><a href="https://github.com/laravel/homestead/issues/1484" rel="nofollow noreferrer">https://github.com/laravel/homestead/issues/1484</a></p>
  <p>I tried to move my code from /mnt to another dir</p>
  <p>But it still hasn't solved the problem</p>
  <p>I can't find the cause of the problem</p>
  <p>Can someone give me some advice?</p>
  <p>php-fpm.ini</p>
  <pre><code>[global]
  pid = /www/server/php/72/var/run/php-fpm.pid
  error_log = /www/server/php/72/var/log/php-fpm.log
  log_level = notice
  
  [www]
  listen = /tmp/php-cgi-72.sock
  listen.backlog = 8192
  listen.allowed_clients = 127.0.0.1
  listen.owner = www
  listen.group = www
  listen.mode = 0666
  user = www
  group = www
  pm = static
  pm.status_path = /phpfpm_72_status
  pm.max_children = 50
  pm.start_servers = 20
  pm.min_spare_servers = 10
  pm.max_spare_servers = 30
  request_terminate_timeout = 4
  request_slowlog_timeout = 0
  slowlog = var/log/slow.log
  </code></pre>
  <p>php.ini</p>
  <pre><code>[PHP]
  engine = On
  short_open_tag = On
  precision = 14
  output_buffering = 4096
  zlib.output_compression = Off
  implicit_flush = Off
  unserialize_callback_func =
  serialize_precision = -1
  disable_classes =
  zend.enable_gc = On
  expose_php = Off
  max_execution_time = 300
  max_input_time = 60
  memory_limit = 128M
  error_reporting = E_ALL &amp; ~E_NOTICE
  display_errors = On
  display_startup_errors = Off
  log_errors = On
  log_errors_max_len = 1024
  ignore_repeated_errors = Off
  ignore_repeated_source = Off
  report_memleaks = On
  html_errors = On
  variables_order = &quot;GPCS&quot;
  request_order = &quot;GP&quot;
  register_argc_argv = Off
  auto_globals_jit = On
  post_max_size = 50M
  auto_prepend_file =
  auto_append_file =
  default_mimetype = &quot;text/html&quot;
  default_charset = &quot;UTF-8&quot;
  doc_root =
  user_dir =
  enable_dl = Off
  cgi.fix_pathinfo=1
  file_uploads = On
  upload_max_filesize = 50M
  max_file_uploads = 20
  allow_url_fopen = On
  allow_url_include = Off
  default_socket_timeout = 60
  [CLI Server]
  cli_server.color = On
  [Date]
  date.timezone = PRC
  [filter]
  [iconv]
  [imap]
  [intl]
  [sqlite3]
  [Pcre]
  [Pdo]
  [Pdo_mysql]
  pdo_mysql.cache_size = 2000
  pdo_mysql.default_socket=
  [Phar]
  [mail function]
  SMTP = localhost
  smtp_port = 25
  sendmail_path = /usr/sbin/sendmail -t -i
  mail.add_x_header = Off
  [ODBC]
  odbc.allow_persistent = On
  odbc.check_persistent = On
  odbc.max_persistent = -1
  odbc.max_links = -1
  odbc.defaultlrl = 4096
  odbc.defaultbinmode = 1
  [Interbase]
  ibase.allow_persistent = 1
  ibase.max_persistent = -1
  ibase.max_links = -1
  ibase.timestampformat = &quot;%Y-%m-%d %H:%M:%S&quot;
  ibase.dateformat = &quot;%Y-%m-%d&quot;
  ibase.timeformat = &quot;%H:%M:%S&quot;
  [MySQLi]
  mysqli.max_persistent = -1
  mysqli.allow_persistent = On
  mysqli.max_links = -1
  mysqli.cache_size = 2000
  mysqli.default_port = 3306
  mysqli.default_socket =
  mysqli.default_host =
  mysqli.default_user =
  mysqli.default_pw =
  mysqli.reconnect = Off
  [mysqlnd]
  mysqlnd.collect_statistics = On
  mysqlnd.collect_memory_statistics = Off
  [OCI8]
  [PostgreSQL]
  pgsql.allow_persistent = On
  pgsql.auto_reset_persistent = Off
  pgsql.max_persistent = -1
  pgsql.max_links = -1
  pgsql.ignore_notice = 0
  pgsql.log_notice = 0
  [bcmath]
  bcmath.scale = 0
  [browscap]
  [Session]
  session.save_handler = files
  session.use_strict_mode = 0
  session.use_cookies = 1
  session.use_only_cookies = 1
  session.name = PHPSESSID
  session.auto_start = 0
  session.cookie_lifetime = 0
  session.cookie_path = /
  session.cookie_domain =
  session.cookie_httponly =
  session.serialize_handler = php
  session.gc_probability = 1
  session.gc_divisor = 1000
  session.gc_maxlifetime = 1440
  session.referer_check =
  session.cache_limiter = nocache
  session.cache_expire = 180
  session.use_trans_sid = 0
  session.sid_length = 26
  session.trans_sid_tags = &quot;a=href,area=href,frame=src,form=&quot;
  session.sid_bits_per_character = 5
  [Assertion]
  zend.assertions = -1
  [COM]
  [mbstring]
  [gd]
  [exif]
  [Tidy]
  tidy.clean_output = Off
  [soap]
  soap.wsdl_cache_enabled=1
  soap.wsdl_cache_dir=&quot;/tmp&quot;
  soap.wsdl_cache_ttl=86400
  soap.wsdl_cache_limit = 5
  [sysvshm]
  [ldap]
  ldap.max_links = -1
  [dba]
  [opcache]
  [curl]
  curl.cainfo = /etc/ssl/certs/ca-certificates.crt
  [openssl]
  openssl.cafile=/etc/ssl/certs/ca-certificates.crt
  [Zend ZendGuard Loader]
  extension = /www/server/php/72/lib/php/extensions/no-debug-non-zts-20170718/fileinfo.so
  [ImageMagick]
  extension = &quot;imagick.so&quot;
  [redis]
  extension = /www/server/php/72/lib/php/extensions/no-debug-non-zts-20170718/redis.so
  </code></pre>