This "old error 504" we know meanwhile very well.
It's not a question of the browser used of course.
"software engineering" is quite a non stable, not exact science.
You have written a program, have started it using really the same parameters a 1000 times.
You always got a correct result. BUT after the 1001 start you get a wrong one, of course using the same parameters. That's it!