[Django]-Malformed Packet: Django admin nested form can't submit, connection was reset

0๐Ÿ‘

โœ…

I allowed my friend accessing to my VPS, then he said me that my problem related to wordpress and showed me below log after page loads and submit pressed:

HTTP/1.1 200 OK
Date: Wed, 22 Feb 2017 15:20:32 GMT
Server: Apache/2.4.18 (Ubuntu)
Vary: Cookie,Accept-Encoding
X-Frame-Options: SAMEORIGIN
Content-Encoding: gzip
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: application/javascript

GET /favicon.ico HTTP/1.1
User-Agent: Mozilla/5.0 (Android 6.0.1; Mobile; rv:51.0.3) Gecko/51.0.3 Firefox/51.0.3
Host: ut3taavoni.ir
Accept-Encoding: gzip
If-Modified-Since: Wed, 22 Feb 2017 15:19:39 GMT
Cache-Control: max-age=60
Connection: keep-alive

HTTP/1.1 200 OK
Date: Wed, 22 Feb 2017 15:20:34 GMT
Server: Apache/2.4.18 (Ubuntu)
Content-Length: 0
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: image/vnd.microsoft.icon
Host: ut3taavoni.ir
User-Agent: Mozilla/5.0 (Android 6.0.1; Mobile; rv:51.0) Gecko/51.0 Firefox/51.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://ut3taavoni.ir/m3s/m3s-panel/members/user/501/
Cookie: csrftoken=3yVd9UL6g69U6Chhy5MQqIcPAy9VyGUM; sessionid=d8xvyszgs05occnnac57lz0vd8zuvqy5
Upgrade-Insecure-Requests: 1
Content-Type: multipart/form-data; boundary=---------------------------6169424391163634213177052432
Content-Length: 19033
Cache-Control: max-age=0
Connection: keep-alive
Content-Disposition: form-data; name="csrfmiddlewaretoken"
Content-Disposition: form-data; name="username"
Content-Disposition: form-data; name="first_name"
Content-Disposition: form-data; name="last_name"
Content-Disposition: form-data; name="email"
Content-Disposition: form-data; name="birth_date_0"
Content-Disposition: form-data; name="birth_date_1"
Content-Disposition: form-data; name="birth_date_2"
Content-Disposition: form-data; name="academic_degree"
Content-Disposition: form-data; name="picture"; filename=""
Content-Type: application/octet-stream
Content-Disposition: form-data; name="international_card_scaned_file"; filename=""
Content-Type: application/octet-stream
Content-Disposition: form-data; name="certificate_scaned_file_page1"; filename=""
Content-Type: application/octet-stream
Content-Disposition: form-data; name="certificate_scaned_file_page2"; filename=""
Content-Type: application/octet-stream
Content-Disposition: form-data; name="academic_degr
Date: Wed, 22 Feb 2017 15:16:32 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:16:32 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:16:32 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:16:32 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:16:32 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:16:32 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:16:32 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:16:32 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:16:32 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html

POST /m3s/m3s-panel/members/user/501/ HTTP/1.1
Host: ut3taavoni.ir
User-Agent: Mozilla/5.0 (Android 6.0.1; Mobile; rv:51.0) Gecko/51.0 Firefox/51.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://ut3taavoni.ir/m3s/m3s-panel/members/user/501/
Cookie: csrftoken=3yVd9UL6g69U6Chhy5MQqIcPAy9VyGUM; sessionid=d8xvyszgs05occnnac57lz0vd8zuvqy5
Upgrade-Insecure-Requests: 1
Content-Type: multipart/form-data; boundary=---------------------------6169424391163634213177052432
Content-Length: 19033
Cache-Control: max-age=0
Connection: keep-alive
Content-Disposition: form-data; name="csrfmiddlewaretoken"
Content-Disposition: form-data; name="username"
Content-Disposition: form-data; name="first_name"
Content-Disposition: form-data; name="last_name"
Content-Disposition: form-data; name="email"
Content-Disposition: form-data; name="birth_date_0"
Content-Disposition: form-data; name="birth_date_1"
Content-Disposition: form-data; name="birth_date_2"
Content-Disposition: form-data; name="academic_degree"
Content-Disposition: form-data; name="picture"; filename=""
Content-Type: application/octet-stream
Content-Disposition: form-data; name="international_card_scaned_file"; filename=""
Content-Type: application/octet-stream
Content-Disposition: form-data; name="certificate_scaned_file_page1"; filename=""
Content-Type: application/octet-stream
Content-Disposition: form-data; name="certificate_scaned_file_page2"; filename=""
Content-Type: application/octet-stream
Content-Disposition: form-data; name="academic_degr
Host: ut3taavoni.ir
User-Agent: jetmon/1.0 (Jetpack Site Uptime Monitor by WordPress.com)
Connection: close

POST /wp-cron.php?doing_wp_cron=1487776996.4416921138763427734375 HTTP/1.1
Host: ut3taavoni.ir
User-Agent: WordPress/4.7.2; http://ut3taavoni.ir
Accept: */*
Accept-Encoding: deflate, gzip
Referer: http://ut3taavoni.ir/wp-cron.php?doing_wp_cron=1487776996.4416921138763427734375
Connection: close
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

HTTP/1.1 200 OK
Date: Wed, 22 Feb 2017 15:23:16 GMT
Server: Apache/2.4.18 (Ubuntu)
Set-Cookie: wfvt_2147194919=58adace494d41; expires=Wed, 22-Feb-2017 15:53:16 GMT; Max-Age=1800; path=/; HttpOnly
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8
Date: Wed, 22 Feb 2017 15:23:16 GMT
Server: Apache/2.4.18 (Ubuntu)
Set-Cookie: wfvt_2147194919=58adace4a1507; expires=Wed, 22-Feb-2017 15:53:16 GMT; Max-Age=1800; path=/; HttpOnly
Link: <http://ut3taavoni.ir/wp-json/>; rel="https://api.w.org/"
Link: <wp.me/P8gOjR-2>; rel=shortlink
Connection: close
Content-Type: text/html; charset=UTF-8
Date: Wed, 22 Feb 2017 15:18:20 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:18:20 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:18:20 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:18:20 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:18:20 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:18:20 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:18:20 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:18:20 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:18:20 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:24:55 GMT
Server: Apache/2.4.18 (Ubuntu)
Set-Cookie: wfvt_2147194919=58adad47d7d5c; expires=Wed, 22-Feb-2017 15:54:55 GMT; Max-Age=1800; path=/; HttpOnly
X-Robots-Tag: noindex, follow
Link: <http://ut3taavoni.ir/wp-json/>; rel="https://api.w.org/"
Connection: close
Content-Type: text/html; charset=UTF-8
Date: Wed, 22 Feb 2017 15:24:55 GMT
Server: Apache/2.4.18 (Ubuntu)
Set-Cookie: wfvt_2147194919=58adad47e1c49; expires=Wed, 22-Feb-2017 15:54:55 GMT; Max-Age=1800; path=/; HttpOnly
X-Robots-Tag: noindex, follow
Link: <http://ut3taavoni.ir/wp-json/>; rel="https://api.w.org/"
Connection: close
Content-Type: text/html; charset=UTF-8
Date: Wed, 22 Feb 2017 15:19:58 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:19:58 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:19:58 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:19:58 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:19:58 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:19:58 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:19:58 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:19:58 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:20:45 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:20:45 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:20:45 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:20:45 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html
Date: Wed, 22 Feb 2017 15:20:45 GMT
Server: Apache/2.4.18 (Ubuntu)
X-Frame-Options: SAMEORIGIN
Connection: close
Content-Type: text/html

Thanks my dear friend Amir

๐Ÿ‘คM.javid

2๐Ÿ‘

We have the same issue on freshly installed system with Apache 2.4 on Cent OS 64 bits. Apache drops connections some time, it was behind nginx, so we get 502 Gateway error very often. There were nothing in logs, nothing with enabled debug, no crash dumps and so on.

The only solution that fixes the problem โ€“ rebuild/reinstall Apache completely. Weโ€™ve found this solution when added debug output code to Apache sources and rebuild, wondering how our debug code fixes the problem. But it was just re-build.

P.S. Also carefully follow this recommendations on debug WSGI http://modwsgi.readthedocs.io/en/develop/user-guides/debugging-techniques.html

๐Ÿ‘คDmitry Shilyaev

Leave a comment