Same for me. My code for “Code à la mode” reached Gold league without issues, then it started to time out a few days before the Legend league opens and it still times out. I didn’t investigate further.
On “Bit Runner 2048”, my code has to reply within 5ms to avoid any timeout (and it is not a guarantee).
I also doubt there is 768 MB memory available since the JVM is started with the following parameters: [-Xms64m, -Xmx450m, -Xverify:none, -Djava.awt.headless=true, -ea].
I just submitted my solution to “The Labyrinth” written in Clojure and got timeouts on random testcases each time I submitted. Removing all error output solved it for me. Having just a single error output as the first statement brings back the same problem.
since the JVM is started with the following parameters: [-Xms64m, -Xmx450m,
Do you know for a fact that these are the parameters used? It would be a good idea if we could have the -Xms and -Xmx set to the same values (and why not -Xmx768M?). This will eliminate the JVM having to resize the heap (costly) and should reduce the number of times the GC has to run.
I am not sure if this is the correct place for this, but my problems seem related.
I recently experienced random timeout errors trying to code the MimeType puzzle in Groovy. The puzzle isn’t exactly rocket science so I was surprised at the timeouts. My Java solution worked fine but the exact same code running as Groovy would result in timeouts on about 50% of the runs. For those not familiar with Groovy it is basically a superset of Java and 99% of valid Java code is also valid Groovy code. So I could use my Java solution as-is and run it as Groovy.
I did some instrumenting using the tips above and found the following:
For Groovy code the JIT compiler didn’t settle down until about 1K iterations.
Calls to System.out were the real culprit.
I was able to solve my timeout issue by writing to a buffer (StringBuilder) and then producing all output with a single call to println() rather than calling println() every iteration. Once I submitted a solution that scored 100% I was able able to view the other Groovy solutions and the two l tried exhibited the same time out problems. So something has changed in later versions of Groovy, but I can’t imagine what.
Hi @HaywoodSlap, your problem is not related to the java timeouts as your simple groovy code times out always on the MimeType puzzle whereas the Java issue is about a timeout that occurs randomly while submitting in multiplayer games (especially when using java 11 which we rolledback)
Nevertheless this is a quite valid issue that we could reproduce and we’ll investigate.