" and set the path and parameters; 4. Start the service That’s it."/> " and set the path and parameters; 4. Start the service That’s it.">

Home >Backend Development >PHP Problem >How to solve the problem of nginx php-cgi automatically closing

How to solve the problem of nginx php-cgi automatically closing

藏色散人
藏色散人Original
2021-10-26 09:31:373210browse

nginx php-cgi automatic shutdown solution: 1. Download nssm; 2. Unzip it and enter the location of nssm.exe; 3. Execute "nssm install" and set the path and Parameters; 4. Start the service.

How to solve the problem of nginx php-cgi automatically closing

The operating environment of this article: Windows7 system, PHP7.3.1 version, DELL G3 computer

How to solve nginx php- cgi automatic shutdown problem?

Solve the problem of nginx php-cgi automatically exiting in the windows environment:

In the windows environment I am This is how to build the PHP environment:

1. Start nginx

2. Start the php-cgi process

There will be a problem. When the request exceeds a certain number of times, php-cgi will hang up

##How to solve?

The idea is to write a daemon process to protect it so that it can automatically restart after hanging up.

How to achieve?

Use nssm to encapsulate php-cgi.exe into a service so that it can be protected.

Steps:

1.

Downloadnssm, download address: http:// www.nssm.cc/download

2.

Extract it and enter the location where nssm.exe is located

3.

Executenssm install , set the path and parameters

4. Start the service

##You're done, running nginx php under windows is as smooth as Dove.

Recommended learning: "

PHP Video Tutorial

"

The above is the detailed content of How to solve the problem of nginx php-cgi automatically closing. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn