hezean / sustc

Template for project 2 of SUSTech Principles of Database Systems (CS307 / CS213), 23 fall semester.
http://172.18.34.154
MIT License
22 stars 9 forks source link

TimeoutException on OJ #105

Closed ywyz233 closed 8 months ago

ywyz233 commented 8 months ago

The taskID is 03aae5cc. Everything was right when I ran benchmark locally. However there is a timeoutException when importing data on OJ.

ywyz233 commented 8 months ago

When I transformed the way of importing date from concurrent execution to serial execution, all test cases on OJ were passed.

hezean commented 8 months ago

unexpected timeouts are often caused by failing to release connections, you'd check if your code could release the connection in all circumstances, like when internal errors occurred.

the platform has successfully run ~400 benchmarks, per our observation, the judger itself is well-developed. if you insist there's something wrong, please verify your program in linux env (to be spec., that's debian 11)

hezean commented 8 months ago

fyi, here's how we run your code

log("*** Running benchmark")
val runner = ProcessBuilder(
    "java", "-Xmx4g", "-Xms4g", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseZGC",
    "-jar", "sustc-runner.jar", "--spring.profiles.active=benchmark"
)
    .directory(Path(workDir, "work", "sustc", "run").toFile())
    .redirectOutput(File(workDir, "result/benchmark-stdout.log"))
    .redirectError(File(workDir, "result/benchmark-stderr.log"))
    .start()

val completed = runner.waitFor(50, TimeUnit.MINUTES)

if (!completed) {
    runner.destroy()
    runner.waitFor(1, TimeUnit.MINUTES)
    throw Exception("Benchmark timeout after 50 minutes")
}
ywyz233 commented 8 months ago

Ok ,Thank you