Django restframework
Hello Everyone,
It has been a week and I am facing a huge problem with my deployed Django application developed with the Django rest framework. The application was successfully deployed and the UI works fine, the static and media files are served properly. But when I try to upload images either through the API endpoint or the admin panel it keeps failing without any error. The OPTIONS request runs successfully but the POST request timeouts. The stderr.log on the Django application directory doesn't show errors other than "[UID:3102][3216972] Child process with pid: 3217881 was killed by signal: 15, core dump: 0". I tried removing the domain and Python application conf to start over but the problem still persists. I tried running my application on localhost and other servers, and the application ran successfully without any errors or timeouts.
Traceback (most recent call last):
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/django/core/handlers/exception.py", line 56, in inner
response = get_response(request)
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 55, in wrapped_view
return view_func(*args, **kwargs)
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/rest_framework/viewsets.py", line 125, in view
return self.dispatch(request, *args, **kwargs)
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/rest_framework/mixins.py", line 17, in create
serializer = self.get_serializer(data=request.data)
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/rest_framework/request.py", line 216, in data
self._load_data_and_files()
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/rest_framework/request.py", line 279, in _load_data_and_files
self._data, self._files = self._parse()
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/rest_framework/request.py", line 354, in _parse
parsed = parser.parse(stream, media_type, self.parser_context)
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/rest_framework/parsers.py", line 108, in parse
data, files = parser.parse()
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/django/http/multipartparser.py", line 123, in parse
return self._parse()
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/django/http/multipartparser.py", line 299, in _parse
for chunk in field_stream:
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/django/http/multipartparser.py", line 478, in __next__
output = next(self._producer)
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/django/http/multipartparser.py", line 615, in __next__
for bytes in stream:
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/django/http/multipartparser.py", line 478, in __next__
output = next(self._producer)
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/django/http/multipartparser.py", line 545, in __next__
data = self.flo.read(self.chunk_size)
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/django/http/request.py", line 408, in read
return self._stream.read(*args, **kwargs)
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/django/core/handlers/wsgi.py", line 40, in read
result = self.buffer + self._read_limited(size - len(self.buffer))
File "/home/awsugnbiz/virtualenv/api/3.8/lib/python3.8/site-packages/django/core/handlers/wsgi.py", line 28, in _read_limited
result = self.stream.read(size)
SystemError: returned NULL without setting an error
OSError: LSAPI: Socket read/write error
-
Hey there! Core dumps and I/O errors always make me think there could be an issue happening with the hardware on the server. Do you see anything interesting in /var/log/messages on the machine? 0 -
Hey there! Core dumps and I/O errors always make me think there could be an issue happening with the hardware on the server. Do you see anything interesting in /var/log/messages on the machine?
That is why the hosting provider refuses to give me access to those files, saying that on shared hosting you can't have root access.0 -
Yes, you would not be able to get root access to a shared server. Hopefully the host will be able to provide you with more details on the issue! 0
Please sign in to leave a comment.
Comments
3 comments