search
HomeBackend DevelopmentPHP Tutorialnginx - php-fpm 一直是ESTABLISHED

nginx - php-fpm 一直是ESTABLISHED

这两天服务器上的php-fpm 一直很奇怪的被一个外部ip访问到 我的php-fpm配置里 做了ip限制 listen.allowed_clients = 127.0.0.1 但是他还是能连进来 而且不是通过9000端口进来的 整个进程一直被占用处于ESTABLISHED状态 怎么回事 是php-fpm有漏洞么 该怎么查杀 ?为什么php-fpm本来监听的9000端口 却通过其他端口连出去了

正常的连接 是下面截图
nginx - php-fpm 一直是ESTABLISHED

回复内容:

nginx - php-fpm 一直是ESTABLISHED

这两天服务器上的php-fpm 一直很奇怪的被一个外部ip访问到 我的php-fpm配置里 做了ip限制 listen.allowed_clients = 127.0.0.1 但是他还是能连进来 而且不是通过9000端口进来的 整个进程一直被占用处于ESTABLISHED状态 怎么回事 是php-fpm有漏洞么 该怎么查杀 ?为什么php-fpm本来监听的9000端口 却通过其他端口连出去了

正常的连接 是下面截图
nginx - php-fpm 一直是ESTABLISHED

web server和fastcgi之间是通过网络连接的啊
一段fastcgi listen 9000,另一端难道不要开端口吗?

因为nginx和php之间是长连接,一旦连接建立成功,就不需要再关闭了,然后两者就可以一直愉快的通信了啊。如果用完一次,就关闭一次,会凭空产生不必要的重连的时延。反正这个连接就只有nginx和php使用,不用担心连接数被耗尽;传统的http协议之所以要做成短连接,是由于web服务是在公网上使用,一个浏览器访问当前网站建立的socket连接如果长时间不释放,然后每个访问的浏览器都学他不释放,服务器连接数就会被耗尽。综上所述,就是长短连接之间的区别和用途了。

我现在已经知道是什么了 那是php和memcache建立的长连接 和nginx没关系 请看清截图和问题 链接是从php出去连外部的 不是外部来连php谢谢

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
How do you create and use an interface in PHP?How do you create and use an interface in PHP?Apr 30, 2025 pm 03:40 PM

The article explains how to create, implement, and use interfaces in PHP, focusing on their benefits for code organization and maintainability.

What is the difference between crypt() and password_hash()?What is the difference between crypt() and password_hash()?Apr 30, 2025 pm 03:39 PM

The article discusses the differences between crypt() and password_hash() in PHP for password hashing, focusing on their implementation, security, and suitability for modern web applications.

How can you prevent Cross-Site Scripting (XSS) in PHP?How can you prevent Cross-Site Scripting (XSS) in PHP?Apr 30, 2025 pm 03:38 PM

Article discusses preventing Cross-Site Scripting (XSS) in PHP through input validation, output encoding, and using tools like OWASP ESAPI and HTML Purifier.

What is autoloading in PHP?What is autoloading in PHP?Apr 30, 2025 pm 03:37 PM

Autoloading in PHP automatically loads class files when needed, improving performance by reducing memory use and enhancing code organization. Best practices include using PSR-4 and organizing code effectively.

What are PHP streams?What are PHP streams?Apr 30, 2025 pm 03:36 PM

PHP streams unify handling of resources like files, network sockets, and compression formats via a consistent API, abstracting complexity and enhancing code flexibility and efficiency.

What is the maximum size of a file that can be uploaded using PHP ?What is the maximum size of a file that can be uploaded using PHP ?Apr 30, 2025 pm 03:35 PM

The article discusses managing file upload sizes in PHP, focusing on the default limit of 2MB and how to increase it by modifying php.ini settings.

What is Nullable types in PHP ?What is Nullable types in PHP ?Apr 30, 2025 pm 03:34 PM

The article discusses nullable types in PHP, introduced in PHP 7.1, allowing variables or parameters to be either a specified type or null. It highlights benefits like improved readability, type safety, and explicit intent, and explains how to declar

What is the difference between the unset() and unlink() functions ?What is the difference between the unset() and unlink() functions ?Apr 30, 2025 pm 03:33 PM

The article discusses the differences between unset() and unlink() functions in programming, focusing on their purposes and use cases. Unset() removes variables from memory, while unlink() deletes files from the filesystem. Both are crucial for effec

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment