It seems that the comment still gets through - it just displays the error message. But when I refresh the page, the comment is there. Still, would appreciate a solution to make it work more smoothly.
I enabled debug mode and it loads for a long time (although without the loading message) and then times out. When refreshing page, comment does show up, just like before.
At first I thought it was our AJAX call timeout which shows same message if there is no response from AJAX call in 30 seconds, but if your page times out when using script without AJAX, then the problem is not in our script. Do you have personal or commercial Akismet API key? Personal keys have lower priority and with personal keys it could take more time for Akismet server to reply to your (comment validation) request. Most web servers are set to terminate page execution (time out) if it is taking more than 30-60 seconds. You (or your web hosting provider) should first increase page load time limit on your web server until you get response from Akismet (no error message, no time out), but although this will make it work, it could still be non-user-friendly if it takes e.g. 60 seconds for Akismet server to reply, and there isn't anything we can do about that.
After you increase server max execution time, it will be a breeze to increase this limit within our script (from default 30 seconds to whatever value is needed).