The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Error while attempting to read POST data

Discussion in 'EasyApache' started by Nirjonadda, Apr 3, 2017.

  1. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    339
    Likes Received:
    8
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    I am getting to many notifications from pingdom about Site Down. Down from multiple locations,Reason: Read time out or Connection Timeout. So everyday we are getting website down for 5/6 time or more. Its not false positive from pingdom. On checking, I got following error in the log file.

    Code:
    [Mon Apr 03 03:37:17.242252 2017] [php7:error] [pid 13527] [client 180.211.252.108:10542] Error while attempting to read POST data: 400, referer: https://www.mysite.com/
    [Mon Apr 03 03:39:18.630654 2017] [http2:error] [pid 13529] (103)Software caused connection abort: [client 180.211.252.108:10545] AH02938: h2_stream(6-13): reading data
    [Mon Apr 03 03:52:15.069675 2017] [php7:error] [pid 15451] [client 119.30.38.150:45244] Error while attempting to read POST data: 400, referer: https://www.mysite.com/forums/breada.112/
    [Mon Apr 03 03:52:28.103030 2017] [php7:error] [pid 15031] [client 27.147.204.12:8746] Error while attempting to read POST data: 400, referer: https://www.mysite.com/forums/self-written.114/
    I was monitoring the server logs and I could see the same error is logged in the log file when the post scripts are executed. Below are the main reasons for the 400 Bad request error.

    Code:
    The 400 status code, or Bad Request error, means the HTTP request that was sent to the server has invalid syntax.
    
    Here are a few examples of when a 400 Bad Request error might occur:
    
        The user's cookie that is associated with the site is corrupt. Clearing the browser's cache and cookies could
        solve this issue
        Malformed request due to a faulty browser
        Malformed request due to human error when manually forming HTTP requests (e.g. using curl incorrectly)
    we are getting notifications from Pingdom too, however, the VPS is online the whole site so it's either related to Apache.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,958
    Likes Received:
    1,274
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Do you notice any similarities with the websites referenced in the error logs? For instance, are the websites using the same PHP application? What PHP handler are you using?

    Thank you.
     
  3. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    339
    Likes Received:
    8
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    I am using XenForo. PHP handler is DSO.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,958
    Likes Received:
    1,274
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    This seems more like an issue isolated to the PHP script itself, but you are welcome to open a support ticket using the link in my signature if you'd like us to take a closer look and rule out any issues with the cPanel software or configuration.

    Thank you.
     
  5. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    339
    Likes Received:
    8
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    I think this error log happened after enabled mod_http2. Now we have disabled mod_http2 and no error log happening about Error while attempting to read POST data.

    Code:
    [Tue Apr 04 14:04:58.424312 2017] [http2:warn] [pid 7425] [client 80.217.134.61:50412] AH03199: session(1): connection disappeared without proper goodbye, clients will be confused, should not happen
    [Tue Apr 04 14:04:59.761533 2017] [mpm_prefork:notice] [pid 7045] AH00169: caught SIGTERM, shutting down
    [Tue Apr 04 14:05:52.931751 2017] [core:notice] [pid 2534] SELinux policy enabled; httpd running as context system_u:system_r:unconfined_service_t:s0
    [Tue Apr 04 14:05:53.271658 2017] [:notice] [pid 2534] ModSecurity for Apache/2.9.0 (http://www.modsecurity.org/) configured.
    [Tue Apr 04 14:05:53.271717 2017] [:notice] [pid 2534] ModSecurity: APR compiled version="1.5.2"; loaded version="1.5.2"
    [Tue Apr 04 14:05:53.271725 2017] [:notice] [pid 2534] ModSecurity: PCRE compiled version="8.32 "; loaded version="8.32 2012-11-30"
    [Tue Apr 04 14:05:53.271729 2017] [:notice] [pid 2534] ModSecurity: LUA compiled version="Lua 5.1"
    [Tue Apr 04 14:05:53.271732 2017] [:notice] [pid 2534] ModSecurity: LIBXML compiled version="2.9.1"
    [Tue Apr 04 14:05:53.271735 2017] [:notice] [pid 2534] ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On.
    [Tue Apr 04 14:05:53.369934 2017] [lbmethod_heartbeat:notice] [pid 2978] AH02282: No slotmem from mod_heartmonitor
    [Tue Apr 04 14:05:53.387591 2017] [http2:info] [pid 2978] AH03090: mod_http2 (v1.8.3, feats=CHPRIO+SHA256+INVHD, nghttp2 1.20.0), initializing...
    [Tue Apr 04 14:05:53.425154 2017] [:notice] [pid 2978] mod_ruid2/0.9.8 enabled
    [Tue Apr 04 14:05:55.277476 2017] [mpm_prefork:notice] [pid 2978] AH00163: Apache/2.4.25 (cPanel) OpenSSL/1.0.2k mod_bwlimited/1.4 configured -- resuming normal operations
    [Tue Apr 04 14:05:55.278157 2017] [core:notice] [pid 2978] AH00094: Command line: '/usr/sbin/httpd'
    [Tue Apr 04 14:06:17.806805 2017] [php7:error] [pid 3220] [client 58.97.139.101:62806] Error while attempting to read POST data: 400, referer: https://www.mysite.com/threads/199/page-597
    [Tue Apr 04 14:06:17.974568 2017] [php7:error] [pid 3220] [client 58.97.139.101:62806] Error while attempting to read POST data: 400, referer: https://www.mysite.com/threads/199/page-728
    [Tue Apr 04 14:08:30.311775 2017] [php7:error] [pid 3769] [client 182.160.117.115:53737] Error while attempting to read POST data: 400, referer: https://www.mysite.com/threads/4624/
    [Tue Apr 04 14:12:23.262666 2017] [mpm_prefork:error] [pid 2978] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting
    [Tue Apr 04 14:13:16.823085 2017] [php7:error] [pid 3973] [client 58.97.139.101:62864] Error while attempting to read POST data: 400, referer: https://www.mysite.com/threads/15196/
    [Tue Apr 04 14:13:43.760318 2017] [php7:error] [pid 3081] [client 58.97.139.101:62809] Error while attempting to read POST data: 408, referer: https://www.mysite.com/threads/199/page-739
    [Tue Apr 04 14:15:19.611173 2017] [php7:error] [pid 4517] [client 58.97.139.101:62893] Error while attempting to read POST data: 400, referer: https://www.mysite.com/threads/my.123506/page-2
    [Tue Apr 04 14:16:17.259407 2017] [php7:error] [pid 4517] [client 58.97.139.101:62893] Error while attempting to read POST data: 400, referer: https://www.mysite.com/threads/199/page-741
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,958
    Likes Received:
    1,274
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You may also want to consider addressing the error message referenced above if the issue continues. You can search for the forums here for the term "server reached MaxRequestWorkers setting" or search elsewhere to see examples of how others have addressed that issue.

    Thank you.
     
  7. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    339
    Likes Received:
    8
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner

    I have set Server Limit to 256 and Max Request Workers to 256. What you are recommended for this MaxRequestWorkers setting?
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,958
    Likes Received:
    1,274
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    The settings you enter depend on your specific server configuration and traffic. You can review a list of system administration service providers if you'd like the help of a qualified system administrator when optimizing your system:

    System Administration Services | cPanel Forums

    Thank you.
     
Loading...

Share This Page