I developed a django app which uses beautifulsoup4 and urllib2
to parse the data from webpages.It was working well on my development server but when I put the same on Apache+wsgi
server, the scrapping for a data entry is very slow.It works sometime and sometime throws error 'Lock wait timeout exceeded; try restarting transaction
. I can't figure out why its not working on the server.When i executed the same parsing function on server in commandline, it took less than 5 secs. But why when I do a entry from django admin its not working? How should I configure the server to make it fast?
PS:Sometimes data is fetched when I make a entry.Comment if any code snippet is required