Adam Cameron
timeout
param on <cfstoredproc>
(https://docs.lucee.org/reference/tags/storedproc.html#attribute-timeout). At the timeout, does this send some sort of "terminate" request to the DB server to kill the proc, or does Lucee simply stop waiting for the DB to come back (and in the background, the proc is still churning away on the DB server).
I might try to come up with some sort of test to find out, but just wondered if someone knows?
It'd be great if this sort of thing was in the docs, rather than just "timeout for the stored procedure.", which is just stating the obvious, and not even really worth saying, I think.Adam Cameron
timeout
attribute works reliably. But... my knowledge of JDBC & MySQL procs beyond "they are def both things that exist" is minimal. I concocted a test:
DELIMITER ;;
CREATE PROCEDURE test_timeout()
BEGIN
declare i INT default 0;
SET i = 1;
WHILE i <= 10 DO
INSERT INTO test (value) values (CONCAT('Proc test row ', i, ' @ ', TIME(NOW())));
SELECT SLEEP(1);
SET i = i + 1;
END WHILE;
END ;;
So does a wee loop and inserts a record every second for 10sec.
<cfstoredproc procedure="test_timeout" result="procResult" timeout="5">
<cfdump var="#procResult#">
This should timeout after 5sec.
Result (after ten seconds):
https://i2.paste.pics/e5c26300562465626458a27f6eb5941c.png▾
Adam Cameron
https://i2.paste.pics/93f77526ffbf26c68407c99c8e2bfeff.png▾
Mark Drew (he/him)
07/21/2022, 3:41 PMAdam Cameron
Mark Drew (he/him)
07/21/2022, 3:47 PMAdam Cameron
Mark Drew (he/him)
07/21/2022, 3:48 PMAdam Cameron
Mark Drew (he/him)
07/21/2022, 3:50 PMAdam Cameron
Adam Cameron