Issue: My AI Django app uses tesseract, Spacy NER model, Langchain, Langgraph and Networkx. These libraries results in local python venv of size 590 MB.
I am using APP Engine Standard Environment to deploy this project. When, I deploy this project to APP Engine - the size of version shown is 621 MB. Although there are no errors shown, I dont see page getting loaded.
I understand instance_class: F1 has lower memory so I changed it F4 without any luck.
When I use instance_class : F1
Exceeded hard memory limit of 384 MiB with 410 MiB after servicing 0 requests total. Consider setting a larger instance class in app.yaml.
Question / Support required:
1. What is alternate approach to deploy this project on GCP that is reasonable in cost?
2. Is there a way, I can reduce the memory --> One suggestion that I implemented and did not work was moving en_core_web_sm model to bucket.
Regards,
Ninad
Hi @NinadJ,
Welcome to the Google Cloud Community!
You are correct, the F1 instance class only supports up to 384 MB of memory. If your app exceeds this limit, it may self terminate and fail to deploy. To resolve this, consider using an instance class with higher memory instead. For more information, see Quotas and Limits. To isolate the issue, you can try running your app locally to see if it runs successfully before deploying it on App Engine.
Question / Support required:
1. What is alternate approach to deploy this project on GCP that is reasonable in cost?
To help minimize costs, see Manage App Engine costs. You may refer to the App Engine pricing page to help give you an estimate of your spend outside of the Google Cloud Free Tier. Depending on your use case, you can also consider other Django deployment options on Google Cloud.
2. Is there a way, I can reduce the memory --> One suggestion that I implemented and did not work was moving en_core_web_sm model to bucket.
Follow these best practices to help you manage and optimize your app’s memory and other resources on App Engine. Also, confirm that your app follows the Python 3 Runtime Environment guidelines.
I found these similar posts that may provide more insight into the issue:
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.