I don't why my previous question was moderated and then deleted but, once again my question stands. I have hosted a website on PythonAnywhere that uses selenium. When more than one user tries to run the bot Harakiri
error comes in the server log.
SERVER LOG
*** HARAKIRI ON WORKER 2 (pid: 485, try: 1) ***
HARAKIRI !!! worker 2 status !!!
HARAKIRI [core 0] 10.0.0.66 - POST /run-bot/ since 1645001048
HARAKIRI !!! end of worker 2 status !!!
DAMN ! worker 2 (pid: 485) died, killed by signal 9 :( trying respawn ...
Respawned uWSGI worker 2 (new pid: 590)
spawned 2 offload threads for uWSGI worker 2
ERROR LOG
Internal Server Error: /run-bot/
Traceback (most recent call last):
File "/home/eyal360/.virtualenvs/fbvenv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/eyal360/.virtualenvs/fbvenv/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/eyal360/.virtualenvs/fbvenv/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/home/eyal360/fb_automation/posts/views.py", line 645, in runBot
bot.runningBot(waiting_hours, curr_user)
File "/home/eyal360/fb_automation/posts/fb_bot.py", line 106, in runningBot
self.performActions(no_loops, curr_user, browser)
File "/home/eyal360/fb_automation/posts/fb_bot.py", line 241, in performActions
group_detail_id = post_object[0]['group_detail_id']
File "/home/eyal360/.virtualenvs/fbvenv/lib/python3.9/site-packages/django/db/models/query.py", line 322, in __getitem__
return qs._result_cache[0]
IndexError: list index out of range
I cant understand what the problem is. Do I need to add celery (But I think it isn't supported on PythonAnywhere ). What should I do? And What does this terms mean (HARAKIRI, uWSGI)