Massive ajax submits - Session gets closed

Hello together!

I am using Neos Flow 6.3 and have a large table (in html, not a DB table) whose cells are editable. To avoid that I have to reload the page completely again and again, the changes of each cell are sent to the server via POST form using Ajax. Now I have a function in the table view, with which I can edit many cells at once - then correspondingly many Ajax submits are sent off at the same time (can be 100). Unfortunately, at about 20 neos flow gets out and terminates the session. I.e. even if I press F5 in my table view, my system kicks me out and I have to log in again.

Can anyone explain this behavior? … and even has a suggested solution for it? :slight_smile: Thanks in advance for your support!

Many greetings, Tobias

Hi @TobMei

It seems like a session issue that @fcool did a package on to fix

Can you add that package and see if it solves your issue?

1 Like

Yay, I think so, too.

If it “works” your problem might be the concurrent access to the session, paired with a race during “read” and “save”. It is actively worked on… but at least until we found the “perfect” solution, the SessionLock is an easy and reachable alternativ. I’d definetely gave it a try, with this description. :wink:
You’ll see there is a Flow 6.3 compatible version at packagist. So it should be quite easy to test, if it helps :wink:

1 Like

Dear Søren, dear Ferdinand, you’re awesome. It works perfectly. Thank you very much!

I would also recommend to optimize this bulk operation and have some persistence service in your JS that will debounce a bit after a change happened and then send whatever changes have happened in that timeframe. Sending hundreds of requests can cause more issues. E.g. one request fails?

1 Like