*mod_wsgi ver. 4.5.4*
header-buffer-size=32768 in WSGDaemonProcess
Here is output of incoming WSGIRequests.META dictionary
{'mod_wsgi.daemon_connects': '1',
'wsgi.file_wrapper': ,
'wsgi.input': ,
'mod_wsgi.total_requests': 0,
'mod_wsgi.script_start':
'1472121938672714',
'HTTP_CONNECTION': 'close',
'CONTEXT_DOCUMENT_ROOT': '/var/www/html',
'HTTP_HOST': 'kcl16bt08.kcell.kz',
'wsgi.url_scheme': 'https',
'mod_wsgi.callable_object': 'application',
'mod_wsgi.version': (4, 5, 4),
'mod_wsgi.daemon_start': '1472121937833037',
'HTTP_X_FORWARDED_HOST': 'kcl16bt08.kcell.kz',
'HTTP_X_FORWARDED_FOR': '2.73.22.35',
'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch, br',
'mod_wsgi.process_group': 'fb_bot',
'SERVER_SOFTWARE': 'Apache/2.4.7 (Ubuntu)',
'mod_wsgi.path_info': '/fb_nanosemantics/bot/',
'mod_wsgi.application_group': '',
'DOCUMENT_ROOT': '/var/www/html',
'QUERY_STRING':
'hub.verify_token=kcl16bt08Anatoliy&hub.challenge=hubChallenge',
'SERVER_PROTOCOL': 'HTTP/1.0',
'mod_wsgi.thread_id': 1,
'HTTP_X_FORWARDED_SERVER': 'kcl16bt08.kcell.kz',
'wsgi.errors': <_io.TextIOWrapper encoding='utf-8'>,
'mod_wsgi.request_id': 'kakrGUOH218',
'REQUEST_METHOD': 'GET',
'mod_wsgi.daemon_restarts': '0',
'SERVER_ADDR': '192.168.216.172',
'HTTP_CACHE_CONTROL': 'max-age=0',
'HTTP_X_REAL_IP': '2.73.22.35',
'PATH_INFO': '/fb_nanosemantics/bot/',
'SERVER_ADMIN': 'webmaster@localhost',
'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
'REQUEST_URI':
'/fb_nanosemantics/bot/?hub.verify_token=kcl16bt08Anatoliy&hub.challenge=hubChallenge'
,
'mod_wsgi.queue_start': '1472121937832612',
'mod_wsgi.script_name': '',
'mod_wsgi.request_handler': 'wsgi-script',
'PATH_TRANSLATED':
'/home/user01/nano_fb_py_bot/nano_fb_py_bot/wsgi.py/fb_nanosemantics/bot/',
'mod_wsgi.listener_port': '443',
'wsgi.multiprocess': False,
'mod_wsgi.listener_host': '',
'mod_wsgi.connection_id': 'rqArGUOH218',
'HTTP_UPGRADE_INSECURE_REQUESTS': '1',
'HTTP_X_FORWARDED_PROTO': 'https',
'wsgi.version': (1, 0),
'mod_wsgi.script_reloading': '1',
'wsgi.multithread': True,
'mod_wsgi.handler_script': '',
'mod_wsgi.thread_requests': 0,
'SERVER_SIGNATURE': 'Apache/2.4.7 (Ubuntu) Server at kcl16bt08.kcell.kz
Port 443\n',
'REMOTE_PORT': '41533',
'HTTP_COOKIE': '__utma=138954921.950862559.1469675440.1472009648.1472012630.3;
__utmz=138954921.1469675440.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)'
,
'LD_LIBRARY_PATH': '/usr/lib/oracle/12.1/client64/lib/',
'mod_wsgi.request_start': '1472121937832337',
'wsgi.run_once': False, 'SERVER_PORT': '443',
'HTTP_ACCEPT':
'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8'
,
'HTTP_USER_AGENT': 'Mozilla/5.0 (Linux; Android 5.1.1; Redmi Note 3
Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.98
Mobile Safari/537.36',
'SERVER_NAME': 'kcl16bt08.kcell.kz',
'GATEWAY_INTERFACE': 'CGI/1.1',
'REQUEST_SCHEME': 'https',
'mod_wsgi.enable_sendfile': '0',
'CONTEXT_PREFIX': '',
'SCRIPT_FILENAME': '/home/user01/nano_fb_py_bot/nano_fb_py_bot/wsgi.py',
'REMOTE_ADDR': '172.16.202.31',
'SCRIPT_NAME': '',
'apache.version': (2, 4, 7)}
as a response on that - i use return HttpResponse(%plain_text_variable%)
HttpResponse imported from django.http.response
Chrome dev.tools also got me this.
Response Headers
1. HTTP/1.1 200 OK Server: nginx/1.8.0 Date: Thu, 25 Aug 2016 11:02:35
GMT Content-Type: text/html; charset=utf-8 Transfer-Encoding: chunked
Connection: keep-alive Vary: Accept-Encoding X-Frame-Options: SAMEORIGIN
Access-Control-Allow-Origin: * Content-Encoding: gzip
1. Request Headersview source
1. Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
2. Accept-Encoding:
gzip, deflate, sdch, br
3. Accept-Language:
en-US,en;q=0.8
4. Cache-Control:
max-age=0
5. Connection:
keep-alive
6. Host:
kcl16bt08.kcell.kz
7. Upgrade-Insecure-Requests:
1
8. User-Agent:
Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/52.0.2743.116 Safari/537.36
четверг, 25 августа 2016 г., 15:48:38 UTC+6 пользователь Graham Dumpleton
написал:
>
> There is no indication that the daemon process crashed, so it may well be
> the case that the response headers returned have values which are too long.
> This can happen when using fancy authentication challenge headers. They
> would need to be more than 8192 characters if using recent mod_wsgi
> versions.
>
> What version of mod_wsgi are you using?
>
> If using a recent version you could set the header-buffer-size option on
> WSGIDaemonProcess to increase allowed header size, but maybe first you can
> explain if there would be any strange headers your response returns,
> including authentication headers.
>
> Graham
>
> On 25 Aug 2016, at 6:57 PM, Anatoly Piskunov <[email protected]
> <javascript:>> wrote:
>
> truncated response error - is in the apache log for my virtualhost
> In the HTTP Client (e.g. Chrome) - i see html output, it's source code
> below ("hubChallenge" string - is a valid plain text response on requested
> url. somehow HTML Error 500 page is appended)
> *hubChallenge*<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><
> head><title>500 Internal Server Error</title></head><body><h1>Internal
> Server Error</h1><p>The server encountered an internal error
> ormisconfiguration and was unable to completeyour request.</p><p>Please
> contact
> the server administrator at webmaster@localhost to inform them of the time
> this error occurred, and the actions you performed just before this error
> .</p><p>More information about this error may be availablein the server
> error log.</p><hr><address>Apache/2.4.7 (Ubuntu) Server at kcl16bt08.kcell
> .kz Port 443</address></body></html>
>
> Log level is set to debug for wsgi. I've performed apache start, and
> requested url:
>
> [Thu Aug 25 14:53:21.089973 2016] [ssl:info] [pid 21811] AH02200: Loading
> certificate & private key of SSL-aware server 'kcl16bt08.kcell.kz:443'
> [Thu Aug 25 14:53:21.090341 2016] [ssl:info] [pid 21811] AH01914:
> Configuring server kcl16bt08.kcell.kz:443 for SSL protocol
> [Thu Aug 25 14:53:21.255183 2016] [ssl:info] [pid 21812] AH02200: Loading
> certificate & private key of SSL-aware server 'kcl16bt08.kcell.kz:443'
> [Thu Aug 25 14:53:21.256078 2016] [ssl:info] [pid 21812] AH01914:
> Configuring server kcl16bt08.kcell.kz:443 for SSL protocol
> [Thu Aug 25 14:53:21.449452 2016] [wsgi:info] [pid 21816] mod_wsgi
> (pid=21816): Attach interpreter ''.
> [Thu Aug 25 14:53:21.450022 2016] [wsgi:info] [pid 21816] mod_wsgi
> (pid=21816): Adding '/home/user01/nano_fb_py_bot' to path.
> [Thu Aug 25 14:53:21.450706 2016] [wsgi:info] [pid 21816] mod_wsgi
> (pid=21816): Adding '/home/user01/.virtualenvs/dev_fbbot_ve/bin' to path.
> [Thu Aug 25 14:53:21.451438 2016] [wsgi:info] [pid 21816] mod_wsgi
> (pid=21816): Adding
> '/home/user01/.virtualenvs/dev_fbbot_ve/lib/python3.4/site-packages' to
> path.
> [Thu Aug 25 14:53:21.487378 2016] [wsgi:info] [pid 21816] mod_wsgi
> (pid=21816): Imported 'mod_wsgi'.
> [Thu Aug 25 14:53:21.488570 2016] [wsgi:debug] [pid 21816]
> src/server/mod_wsgi.c(8706): mod_wsgi (pid=21816): Started thread 2 in
> daemon process 'fb_bot'.
> [Thu Aug 25 14:53:21.488730 2016] [wsgi:debug] [pid 21816]
> src/server/mod_wsgi.c(8706): mod_wsgi (pid=21816): Started thread 3 in
> daemon process 'fb_bot'.
> [Thu Aug 25 14:53:21.488805 2016] [wsgi:debug] [pid 21816]
> src/server/mod_wsgi.c(8706): mod_wsgi (pid=21816): Started thread 1 in
> daemon process 'fb_bot'.
> [Thu Aug 25 14:53:21.488892 2016] [wsgi:debug] [pid 21816]
> src/server/mod_wsgi.c(8706): mod_wsgi (pid=21816): Started thread 0 in
> daemon process 'fb_bot'.
> [Thu Aug 25 14:53:21.488980 2016] [wsgi:debug] [pid 21816]
> src/server/mod_wsgi.c(8706): mod_wsgi (pid=21816): Started thread 4 in
> daemon process 'fb_bot'.
> [Thu Aug 25 14:53:42.025878 2016] [ssl:info] [pid 21817] [client
> 172.16.202.31:63658] AH01964: Connection to child 0 established (server
> kcl16bt08.kcell.kz:443)
> [Thu Aug 25 14:53:42.042454 2016] [wsgi:info] [pid 21816] [remote
> 172.16.202.31:63658] mod_wsgi (pid=21816, process='fb_bot',
> application=''): Loading WSGI script
> '/home/user01/nano_fb_py_bot/nano_fb_py_bot/wsgi.py'.
> [Thu Aug 25 14:53:42.952338 2016] [ssl:info] [pid 21835] [client
> 172.16.202.31:10193] AH01964: Connection to child 8 established (server
> kcl16bt08.kcell.kz:443)
> [Thu Aug 25 14:53:43.456475 2016] [wsgi:info] [pid 21839] mod_wsgi
> (pid=21839): Attach interpreter ''.
> [Thu Aug 25 14:53:43.456761 2016] [wsgi:info] [pid 21839] mod_wsgi
> (pid=21839): Adding '/home/user01/nano_fb_py_bot' to path.
> [Thu Aug 25 14:53:43.457157 2016] [wsgi:info] [pid 21839] mod_wsgi
> (pid=21839): Adding '/home/user01/.virtualenvs/dev_fbbot_ve/bin' to path.
> [Thu Aug 25 14:53:43.457518 2016] [wsgi:info] [pid 21839] mod_wsgi
> (pid=21839): Adding
> '/home/user01/.virtualenvs/dev_fbbot_ve/lib/python3.4/site-packages' to
> path.
> [Thu Aug 25 14:53:43.475090 2016] [wsgi:info] [pid 21839] mod_wsgi
> (pid=21839): Imported 'mod_wsgi'.
> [Thu Aug 25 14:53:43.475388 2016] [wsgi:debug] [pid 21839]
> src/server/mod_wsgi.c(8706): mod_wsgi (pid=21839): Started thread 0 in
> daemon process 'fb_bot'.
> [Thu Aug 25 14:53:43.475441 2016] [wsgi:debug] [pid 21839]
> src/server/mod_wsgi.c(8706): mod_wsgi (pid=21839): Started thread 1 in
> daemon process 'fb_bot'.
> [Thu Aug 25 14:53:43.475696 2016] [wsgi:debug] [pid 21839]
> src/server/mod_wsgi.c(8706): mod_wsgi (pid=21839): Started thread 2 in
> daemon process 'fb_bot'.
> [Thu Aug 25 14:53:43.475780 2016] [wsgi:debug] [pid 21839]
> src/server/mod_wsgi.c(8706): mod_wsgi (pid=21839): Started thread 3 in
> daemon process 'fb_bot'.
> [Thu Aug 25 14:53:43.476081 2016] [wsgi:debug] [pid 21839]
> src/server/mod_wsgi.c(8706): mod_wsgi (pid=21839): Started thread 4 in
> daemon process 'fb_bot'.
> [Thu Aug 25 14:53:43.476238 2016] [wsgi:info] [pid 21839] [remote
> 172.16.202.31:10193] mod_wsgi (pid=21839, process='fb_bot',
> application=''): Loading WSGI script
> '/home/user01/nano_fb_py_bot/nano_fb_py_bot/wsgi.py'.
> [Thu Aug 25 14:53:44.125366 2016] *[wsgi:error]* [pid 21835] [client
> 172.16.202.31:10193] Truncated or oversized response headers received
> from daemon process 'fb_bot':
> /home/user01/nano_fb_py_bot/nano_fb_py_bot/wsgi.py, referer:
> https://kcl16bt08.kcell.kz/fb_nanosemantics/bot/?hub.verify_tokn=token&hub.challnge=hub
> [Thu Aug 25 14:53:44.461167 2016] [wsgi:info] [pid 21849] mod_wsgi
> (pid=21849): Attach interpreter ''.
> [Thu Aug 25 14:53:44.461420 2016] [wsgi:info] [pid 21849] mod_wsgi
> (pid=21849): Adding '/home/user01/nano_fb_py_bot' to path.
> [Thu Aug 25 14:53:44.461767 2016] [wsgi:info] [pid 21849] mod_wsgi
> (pid=21849): Adding '/home/user01/.virtualenvs/dev_fbbot_ve/bin' to path.
> [Thu Aug 25 14:53:44.462090 2016] [wsgi:info] [pid 21849] mod_wsgi
> (pid=21849): Adding
> '/home/user01/.virtualenvs/dev_fbbot_ve/lib/python3.4/site-packages' to
> path.
> [Thu Aug 25 14:53:44.480225 2016] [wsgi:info] [pid 21849] mod_wsgi
> (pid=21849): Imported 'mod_wsgi'.
> [Thu Aug 25 14:53:44.480470 2016] [wsgi:debug] [pid 21849]
> src/server/mod_wsgi.c(8706): mod_wsgi (pid=21849): Started thread 0 in
> daemon process 'fb_bot'.
> [Thu Aug 25 14:53:44.480593 2016] [wsgi:debug] [pid 21849]
> src/server/mod_wsgi.c(8706): mod_wsgi (pid=21849): Started thread 1 in
> daemon process 'fb_bot'.
> [Thu Aug 25 14:53:44.480688 2016] [wsgi:debug] [pid 21849]
> src/server/mod_wsgi.c(8706): mod_wsgi (pid=21849): Started thread 2 in
> daemon process 'fb_bot'.
> [Thu Aug 25 14:53:44.480782 2016] [wsgi:debug] [pid 21849]
> src/server/mod_wsgi.c(8706): mod_wsgi (pid=21849): Started thread 3 in
> daemon process 'fb_bot'.
> [Thu Aug 25 14:53:44.481058 2016] [wsgi:debug] [pid 21849]
> src/server/mod_wsgi.c(8706): mod_wsgi (pid=21849): Started thread 4 in
> daemon process 'fb_bot'.
>
> четверг, 25 августа 2016 г., 12:56:43 UTC+6 пользователь Graham Dumpleton
> написал:
>>
>> As in the mod_wsgi daemon process crashed and you got the truncated
>> response error, or you are getting the error from the HTTP client?
>>
>> Can you ensure that LogLevel in Apache is set to ‘info’ and not just
>> ‘warn’.
>>
>> This will cause mod_wsgi to output log messages about daemon process
>> stopping and starting. I would like to see what these message say at the
>> time you see the truncated response message.
>>
>> Thanks.
>>
>> Graham
>>
>> On 25 Aug 2016, at 4:50 PM, Anatoly Piskunov <[email protected]>
>> wrote:
>>
>> I've just tried. Nothing changed
>>
>> четверг, 25 августа 2016 г., 12:39:39 UTC+6 пользователь Graham Dumpleton
>> написал:
>>>
>>> Rather than set:
>>>
>>> SetEnv no-gzip 1
>>>
>>> what happens when you disable mod_deflate altogether? That would turn
>>> off compression inbound and outbound for the whole server.
>>>
>>> Understand if you can’t disable it for other reasons.
>>>
>>> Graham
>>>
>>> On 25 Aug 2016, at 4:33 PM, Graham Dumpleton <[email protected]>
>>> wrote:
>>>
>>>
>>> On 25 Aug 2016, at 4:28 PM, Anatoly Piskunov <[email protected]>
>>> wrote:
>>>
>>> ...and maybe i should just use *--compress-responses* instead *no-gzip*,
>>> but i haven't figured out how(
>>>
>>>
>>> The —compress-responses option is something to do with mod_wsgi-express,
>>> which you aren’t using.
>>>
>>> In mod_wsgi-express what that option does is ensure the mod_deflate is
>>> loaded and adds:
>>>
>>> AddOutputFilterByType DEFLATE text/plain
>>> AddOutputFilterByType DEFLATE text/html
>>> AddOutputFilterByType DEFLATE text/xml
>>> AddOutputFilterByType DEFLATE text/css
>>> AddOutputFilterByType DEFLATE text/javascript
>>> AddOutputFilterByType DEFLATE application/xhtml+xml
>>> AddOutputFilterByType DEFLATE application/javascript
>>>
>>> You seem to want to turn off gzip, not turn it on.
>>>
>>> Graham
>>>
>>>
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "modwsgi" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/modwsgi.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>
> .
> Visit this group at https://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.