squeaky-pl / japronto

Screaming-fast Python 3.5+ HTTP toolkit integrated with pipelining HTTP server based on uvloop and picohttpparser.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fatal Python error: Segmentation fault,Worker crashed on signal SIGSEGV!

traers opened this issue · comments

commented

when I run 1000 locust users,it was wrong.

Fatal Python error: Segmentation fault

Current thread 0x00007f7a249a5080 (most recent call first):
File "/usr/local/lib/python3.7/site-packages/japronto/app/init.py", line 182 in serve
File "/usr/local/lib/python3.7/multiprocessing/process.py", line 99 in run
File "/usr/local/lib/python3.7/multiprocessing/process.py", line 297 in _bootstrap
File "/usr/local/lib/python3.7/multiprocessing/popen_fork.py", line 74 in _launch
File "/usr/local/lib/python3.7/multiprocessing/popen_fork.py", line 20 in init
File "/usr/local/lib/python3.7/multiprocessing/context.py", line 277 in _Popen
File "/usr/local/lib/python3.7/multiprocessing/context.py", line 223 in _Popen
File "/usr/local/lib/python3.7/multiprocessing/process.py", line 112 in start
File "/usr/local/lib/python3.7/site-packages/japronto/app/init.py", line 228 in _run
File "/usr/local/lib/python3.7/site-packages/japronto/app/init.py", line 264 in run
File "async.py", line 25 in
Worker crashed on signal SIGSEGV!

======================================

The code is as follows, please take a look:

import asyncio
from japronto import Application

async def asynchronous(request):
    await asyncio.sleep(0.01)
    return request.Response(text='0.01 seconds elapsed')

app = Application()

r = app.router
r.add_route('/async', asynchronous)

app.run()