Background:
*Beginner here. *
I made a simple app with some basic models and trained it to distinguish happy and sad faces. I made this and ran it in a local development server with Django which worked perfectly and I was even able to display the image after getting a non-logged-in user to upload.
Then, I tried uploading the app to a non-local server. This server is part of a shared web hosting package and has cPanel. The app works fine till I upload the image and then it shows a 503 error.
The server resource logs show that usage spikes when I upload the image and it is fed into the pre-trained neural network but nothing that would overpower the limits, only 75% of server physical memory being used.
Server Specs:
Server Specs
TLDR:
Uploaded a Django app with an Image Classification model which shows a 503 error after uploading the image from the front-end.
Error Logs:
2024-05-05 16:03:28.355186: I external/local_tsl/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used.
2024-05-05 16:03:28.359620: I external/local_tsl/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used.
2024-05-05 16:03:28.396387: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-05-05 16:03:29.074391: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
WARNING:absl:Compiled the loaded model, but the compiled metrics have yet to be built. `model.compile_metrics` will be empty until you train or evaluate the model.
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
W0000 00:00:1714925015.436559 3986787 tf_tfl_flatbuffer_helpers.cc:390] Ignored output_format.
W0000 00:00:1714925015.436612 3986787 tf_tfl_flatbuffer_helpers.cc:393] Ignored drop_control_dependency.
2024-05-05 16:03:35.437169: I tensorflow/cc/saved_model/reader.cc:83] Reading SavedModel from: /tmp/tmp5fvxrdmv
2024-05-05 16:03:35.437697: I tensorflow/cc/saved_model/reader.cc:51] Reading meta graph with tags { serve }
2024-05-05 16:03:35.437712: I tensorflow/cc/saved_model/reader.cc:146] Reading SavedModel debug info (if present) from: /tmp/tmp5fvxrdmv
2024-05-05 16:03:35.438151: F external/local_tsl/tsl/platform/default/env.cc:74] Check failed: ret == 0 (11 vs. 0)Thread tf_Compute creation via pthread_create() failed.
[UID:1925][3986777] Child process with pid: 3986787 was killed by signal: 6, core dumped: yes
I’ve tried:
- Updating the PHP version (noob ik)
- Using Tensorflow lite.
- Uninstalling and re-installing the app several times.
- Creating other applications with simpler tasks (calculator etc. which work fine)
There are no other logs that I can find related to this in the server & I have no idea what is causing this error. There are no resources and I expected it to be a common occurrence but it wasn’t.