Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8860611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:17:47+00:00 2026-06-14T15:17:47+00:00

I have a very weird problem. There is a test.php file on the server

  • 0

I have a very weird problem. There is a test.php file on the server that has approximately 3k lines of code (100 kB). The code does nothing, it’s a definition of a rather big class with many parameters and functions but that class never gets instantiated or used in any way.

I am accessing test.php at the rate of 100 requests/second until it gets accessed 1000 times. After that I make sure the server is calm and run the test again. First few runs are usually fine. Then the following run has some timed out requests. The next run has much more timed out requests. And then if I do it again, almost all requests fail while top is showing a couple php5-fpm doing something that requires 100% of CPU. It usually takes minutes for the server to calm down and while in this state, any attempts to do HTTP requests result in 504 error.

Same tests with static files (e.g. test.html) or an empty test2.php which has php open-close tags only, produce no interesting results, everything runs smoothly.

The server is an Nginx AWS EC2 instance. I tried playing with configs with no luck so far. Below are some of the parameters that might be relevant.

root@ip-...:~# cat /proc/cpuinfo
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 23
model name  : Intel(R) Xeon(R) CPU           E5430  @ 2.66GHz
stepping    : 10
cpu MHz     : 2659.994
cache size  : 6144 KB
fdiv_bug    : no
hlt_bug     : no
f00f_bug    : no
coma_bug    : no
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu tsc msr pae cx8 cmov pat pse36 clflush dts mmx fxsr sse sse2 ss ht pbe nx lm constant_tsc up arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 lahf_lm dts tpr_shadow vnmi flexpriority
bogomips    : 5319.98
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual
power management:

root@ip-...:~# nproc
1

http://www.conf

pm.max_requests = 500
pm.max_children = 5
pm = dynamic

nginx.conf

worker_processes 4;
events {
    worker_connections 768;
}
http {
    gzip on;
    client_body_timeout 300;
    client_header_timeout 300;
    send_timeout 300;
    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
}

I tried decreasing this to 1 nginx worker + 1 php child as well as playing with a few other things but none of these things appear to be making any difference. From what I can tell memory never gets swapped. Any ideas on what else can be debugged or checked, would be highly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T15:17:48+00:00Added an answer on June 14, 2026 at 3:17 pm

    Use apc. This will cache the parsed PHP file as opcode and skip parsing it over and over again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very weird problem. I am using PHP, in my PHP code,
I have a very weird problem.. I really do hope someone has an answer
Today, i have very weird problem with trim function. Here is my code. =and
I have a very weird problem. I have a VB.NET 2.0 application that takes
I have a very weird problem. I have a webpage that displays some graphs
So I have a very weird problem. I am writing some code in VB.Net
I have a very weird problem in Firefox ( version 3.5.2), and I am
I have a very weird problem with PROLOG. I have used it before, but
Hello I have a very weird problem in chrome I just cannot figure out!
I am experiencing a very weird problem: In WPF I have a tabControl which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.