4

i have a little problem with nginx and php7.0-fpm. I have much less requests per second than apache + mod_php.

For example (same server)

ab tests

Requested script in tests is simple echo.

//EDIT:

nginx conf & www.conf & php.ini http://pastebin.com/9m6yx8h4

//EDIT2:

if is use apache with fast=cgi module instead mod_php module i will get same result than nginx + fast-cgi (30r./s.). Is problem in php-fpm?

Where could be the problem?

3
  • The problem is with your Nginx configuration. Since you've given us no information we can't be more specific. It's likely to do with caching. If you'd like more specific help I suggest you edit your question to include Nginx and Apache configuration, some logs if applicable, some information on your testing, that sort of thing. Commented Oct 12, 2016 at 2:57
  • Please copy the test results as text to the question. Please also include the configuration files directly into the text instead of using external services. Commented Oct 12, 2016 at 14:56
  • Your link to nginx/apache conf only gives apache conf Commented Oct 12, 2016 at 17:42

1 Answer 1

2

Your tests are not on similarly configured servers.

Your Apache server served all its requests with keepalives enabled, but your nginx server served all its requests with keepalives disabled, which creates a significant reduction in performance as a new TCP connection must be opened for every request.

By default, nginx has keepalives enabled, so you must have explicitly disabled them somehow. Inspect your nginx configuration carefully and remove any directives related to keepalive, so that nginx uses its default behavior. Then try your benchmark again.

3
  • i have activated keepalive, can i contact you? i am really frustated Commented Oct 12, 2016 at 20:16
  • @Carma You also need to configure keepalive for nginx--php-fpm, for example. Commented Oct 15, 2016 at 1:24
  • doesnt work, no effect :( Commented Oct 16, 2016 at 15:05

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.