Closed YAJeff closed 5 years ago
You can use The Python Profilers for debug your program's run time performance.
I will try this today. Not sure how to use it with Django, or inside of a container. But ok.
If there's anything that's obvious that stands out, would be helpful. As it is, it takes >2,500 times longer to process a request in a container vs running locally.
Interesting results. Anything that clearly stands out here to anyone? I'm not an expert on Django and am not sure why I'm seeing such long operations.
Running a python docker image based off of Windows Server Core-LTSC 2016. Within the application is a Django web api we've created.
Calls to routes that don't exist seem to work fine.
This application works perfectly fine and returns results in under 50ms when running locally on my machine (no docker container).
When calling my service and passing in 132KB of JSON data, the service completely hangs. We've found that reducing the amount of JSON sending in will allow the web api to respond successfully. But it still takes a couple of seconds to process the request.
Here's the command I'm using to build:
docker build -t mysvc-1.0 .
Here's the command I'm using to run:
docker run -it --rm --name vsvc -p 12000:8000 mysvc-1.0
Here's my dockerfile:
I've tried setting the memory and CPU count, neither fixed the issue.
Am I missing something?