I am facing some behavior that I was not expecting I have a synchronous process that is PHP / OCI8 Is removed from the beginning of this process for a SELECT ... to update
I do NOWAIT because I want to I promptly inform the user with an error message that the process is already running, lock your browser Instead of waiting.
When I run the process from two different computers with two separate computers, I get the expected behavior: the second goes to ORA-200054: The resource is busy and the time specified Acquisition with .
But when I open two tabs on the same browser and run the process, the second tab runs 30+ seconds to finish the first time, and then runs the second - it looks like I < Code> NOWAIT not specified.
I'm not using any kind of connection or connection pooling continuously. I thought that by executing a different HTTP request, separate PHP => Oracle connection, I would get a separate DB session. Is not that the case?
Update: I found: How to join the OCI8 extension from Oracle, under # 6? This says:
PHP will share / reuse connection connections, if the same user credentials are used multiple times in a script or httpd server session. You can use the oci_new_connect () function to make sure you use the new session. To make a stable connection, call the oci_pconnect () function which is not closed at the end of the script (by making the re-combinations very fast in the next script).
However, when I change from oci_new_connect it does not fix this problem, throw different sessions ORA-00054 on different computers , But synchronize two tab access to the same browser but do not respect NOWAIT
Remember, there is" load "and then" swap "is
It is possible that another process udpates php how your session driver works in this session session Security depends on this.
Comments
Post a Comment