Fix javascript engine stops when multiple requests are processing

Javascript engine stops when multiple requests are processing concurrently.
To fix this problem, I add a lock for javascript execution.