I have a django site that servers matplotlib images generated from numbers stored in a mysql database.
One of the views will display up to 5 images. The src value for the images do not link to static files but instead to django views that will generate png images. The images can take up to 5 seconds to load. The same django view function is not being called repeatedly. The five images correspond to different types of plotting methods, each has its own function in django view.
When multiple requests for the images are sent, the server freezes up. I am developing the site with xampp. I cannot load the site in another tab, or any of the php sites I have running on the same server.
If I try to load all the images with the initial page load the server freezes. If I load the page then request the images separately using jquery/ajax (and wait patiently) then there is no problem. If I quickly make two ajax requests then the server freezes.
Can anyone explain what might be the source of the problem?
Can I force the serialized execution of the requests on the server?
Can I use javascript to delay each request until the prior image is returned (and not just when the link is update as is currently the case)?
Or can I put a time limit on the requests to kill these hang ups on the server?
Thanks. It would be a big help if someone could help me resolve this.