If you have sessions in files, the session file is locked upon each request, so each new request must wait for the previous one to complete. This generally is much of a problem unless you have some very long running requests, as in your case. The best practice with long running operations is not to handle them in a single HTTP request but instead use the built-in scheduler or some kind of task queue to complete the task asynchronously. If you don't want to get into that complication right now, though, you can unlock the session file for a given request by doing:
session.forget(response) Unfortunately, you can't use the above in your long-running uniprot_merops action, as that action writes to the session. That means you would instead have to unlock the session in any *other* actions you might want to view simultaneously (and of course, this won't help if some of *those* actions need to write to the session). Also, as an aside, I see you "result" action simply calls the uniprot_merops action. I assume that means uniprot_merops is not attended to be reached on its own via URL. If that is the case, you should make it a private function by either giving it some arguments or preceding its name with a double underscore (in a controller, such functions are not reachable via URL). Anthony On Friday, July 24, 2015 at 5:14:54 PM UTC-4, sonu kumar wrote: > > Hi All, > > I am facing issues with handling several request in parallel from same > user. > When I submit one job and then simultaneously try to open my server > homepage in new tab, it waits until first one finishes. I went through some > earlier answers regarding this and came to know that there is some issue > with session but I am not aware how to resolve this using session.forget() > or where to put this in my code. I tried to put this in one function in my > code but it doesn't allow my job to run further. > > I have also used session variable in my views/html file... > > I have attached my sample code... > > Thanks > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.