[issue43007] set_wakeup_fd() only works in main thread

2021-11-20 Thread MeneMeneTekel


MeneMeneTekel  added the comment:

Finally... it works for me - I migrated to

 - Windows Server 2019 Datacenter
 - WinPython 3.9.5
 - Apache24 AH
 - Django 3.2.9
 - mod_wsgi-4.9.0-cp39-cp39-win_amd64

Whoever made that it works again thanks a lot ;-)

MeneMeneTekel

--
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43007] set_wakeup_fd() only works in main thread

2021-06-04 Thread MeneMeneTekel


MeneMeneTekel  added the comment:

Update: I just tried it again with 
 - Windows 10 Pro, 21H1
 - WinPython 3.9.4
 - Apache24
 - Django 3.2.4
 - mod_wsgi-4.8.0-cp39-cp39-win_amd64

Actually, there is no change, it got even worse. i.e. this wake up situation 
occurs more often. 

Remember: Changing WinPython 3.9.4 to WinPython 3.7.7 with 
mod_wsgi-4.7.1-cp37-cp37m-win_amd64 and all works fine!

Perhaps it's useful to have a stack trace? Here we are:

**
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819] mod_wsgi (pid=6556): Failed to exec Python script file 
'C:/.../.../.../wsgi.py'.
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819] mod_wsgi (pid=6556): Exception occurred processing WSGI 
script 'C:/.../.../.../wsgi.py'.
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819] Traceback (most recent call last):\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819]   File "C:/.../.../.../wsgi.py", line 19, in \r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819] application = get_wsgi_application()\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819]   File 
"C:\\Winpython\\WPy64-3940\\python-3.9.4.amd64\\lib\\site-packages\\django\\core\\wsgi.py",
 line 13, in get_wsgi_application\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819] return WSGIHandler()\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819]   File 
"C:\\Winpython\\WPy64-3940\\python-3.9.4.amd64\\lib\\site-packages\\django\\core\\handlers\\wsgi.py",
 line 127, in __init__\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819] self.load_middleware()\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819]   File 
"C:\\Winpython\\WPy64-3940\\python-3.9.4.amd64\\lib\\site-packages\\django\\core\\handlers\\base.py",
 line 58, in load_middleware\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819] mw_instance = middleware(adapted_handler)\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819]   File 
"C:\\Users\\mail\\OneDrive\\Dokumente\\Privat\\Python\\Django\\Applications\\groupregister\\middleware\\sessions.py",
 line 54, in __init__\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819] self.user_reg = get_user_model().objects \\\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819]   File 
"C:\\Winpython\\WPy64-3940\\python-3.9.4.amd64\\lib\\site-packages\\django\\db\\models\\query.py",
 line 399, in aggregate\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819] return query.get_aggregation(self.db, kwargs)\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819]   File 
"C:\\Winpython\\WPy64-3940\\python-3.9.4.amd64\\lib\\site-packages\\django\\db\\models\\sql\\query.py",
 line 502, in get_aggregation\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819] result = compiler.execute_sql(SINGLE)\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819]   File 
"C:\\Winpython\\WPy64-3940\\python-3.9.4.amd64\\lib\\site-packages\\django\\db\\models\\sql\\compiler.py",
 line 1173, in execute_sql\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819] cursor = self.connection.cursor()\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819]   File 
"C:\\Winpython\\WPy64-3940\\python-3.9.4.amd64\\lib\\site-packages\\django\\utils\\asyncio.py",
 line 19, in inner\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819] event_loop = asyncio.get_event_loop()\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819]   File 
"C:\\Winpython\\WPy64-3940\\python-3.9.4.amd64\\lib\\asyncio\\events.py", line 
639, in get_event_loop\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819] self.set_event_loop(self.new_event_loop())\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819]   File 
"C:\\Winpython\\WPy64-3940\\python-3.9.4.amd64\\lib\\asyncio\\events.py", line 
659, in new_event_loop\r
[Fri Jun 04 15:31:37.428939 2021] [wsgi:error] [pid 6556:tid 1140] [client 
111.222.333.444:50819] return self._loop_factory()\r
[Fri Jun 

[issue43007] set_wakeup_fd() only works in main thread

2021-01-23 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy: +gvanrossum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43007] set_wakeup_fd() only works in main thread

2021-01-23 Thread MeneMeneTekel


New submission from MeneMeneTekel :

This problem is marked as solved in issue38563, BUT the solution refers to some 
signal issues being solved - I'm using Python 3.8.7 on windows 10, where a 
signal solution may not work. I.e. my django (vers. 3.1.5) website crashes 
every second call with the message:

  File 
"C:\Winpython\WPy64-3870\python-3.8.7.amd64\lib\asyncio\proactor_events.py", 
line 632, in __init__
signal.set_wakeup_fd(self._csock.fileno())
ValueError: set_wakeup_fd only works in main thread

--
components: asyncio
messages: 385528
nosy: MeneMeneTekel, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: set_wakeup_fd() only works in main thread
type: crash
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com