-
Notifications
You must be signed in to change notification settings - Fork 951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
startAsync / task {} controller methods produce unreliable results. #9198
Comments
Will run the above demo when on another computer but this looks similar to our problem: Hibernate sessions fetch stale data when using async controllers and long polling |
It's the same bug we've hit and it basically renders aync controller actions useless - IMHO this bug should be tagged as blocker because you can do something almost completely copied from the user manual and get your app in serious, hard to pinpoint trouble. I've put together a simpler app, no need to run scripts, just refresh a page. You can download it here and open Besides a simple
I am almost certain Hibernate sessions are not getting closed and are later reused either after exiting the async controller block or after exiting the controller action. If I lower the number of maximum connections in the connection pool to 2, I will get If I explicitly close the session at the end of requests (via e.g. As we are using async controllers in production already and have only recently connected various random problems to this bug, I would really appreciate a workaround if one is possible before 2.5.2 is released! |
It also seems the bug is fixed in 3.0.7. |
As you say you can copy/paste examples from the manual and run into this issue. Any chance this will be fixed in the 2.5.x branch as in some cases significant effort is required to upgrade to 3.x |
Thanks for the feedback guys, I have marked it is a blocker and we will look at doing a 2.5.2 release soon. |
Great, thanks, let us know if we can offer any further help! |
I met with this issue in release 2.5.1 too. I have to say, this is really a nasty issue, it blocks the async function to be used in production mode. A fix should be available as soon as possible. |
I will be looking at 2.5.x issues next week as soon as 3.0.8 is done... |
…sults. The fix here is that the session was not being closed for async requests.
Thank you Graeme, much appreciated |
Has a try on the snapshot build, and found the issue is fixed perfect. Thanks Graeme. When will the grails v2.5.2 be available? |
When using startAsync or task {} in controller methods for asynchronous processing, output is unreliable. By unreliable I mean that Hibernate (or wherever the issue lies) is producing semi-random output. Steps to reproduce:
To duplicate:
Tested on Mac OS X 10.10.2 - grails 2.5.1
Java details:
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
The text was updated successfully, but these errors were encountered: