Merged in victorsl/processmaker/PM-1903 (pull request #1827)
PM-1903 "0017014: ProcessMaker loses connection..." SOLVED
This commit is contained in:
14
gulliver/thirdparty/propel/Propel.php
vendored
14
gulliver/thirdparty/propel/Propel.php
vendored
@@ -598,12 +598,16 @@ class Propel {
|
||||
*/
|
||||
public static function close()
|
||||
{
|
||||
$last = '';
|
||||
foreach(self::$connectionMap as $conn) {
|
||||
if ($last != $conn->lastQuery) {
|
||||
$conn->close();
|
||||
$lastQuery = "";
|
||||
|
||||
foreach (self::$connectionMap as $cnn) {
|
||||
if (!($cnn instanceof DBArrayConnection)) {
|
||||
if (gettype($cnn->getResource()) == "resource" && $cnn->isConnected() && $cnn->lastQuery != $lastQuery) {
|
||||
$cnn->close();
|
||||
}
|
||||
|
||||
$lastQuery = $cnn->lastQuery;
|
||||
}
|
||||
$last = $conn->lastQuery;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
<?php
|
||||
register_shutdown_function(
|
||||
create_function(
|
||||
"",
|
||||
"
|
||||
if (class_exists(\"Propel\")) {
|
||||
Propel::close();
|
||||
}
|
||||
"
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* cron_single.php
|
||||
* @package workflow-engine-bin
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
<?php
|
||||
register_shutdown_function(
|
||||
create_function(
|
||||
"",
|
||||
"
|
||||
if (class_exists(\"Propel\")) {
|
||||
Propel::close();
|
||||
}
|
||||
"
|
||||
)
|
||||
);
|
||||
|
||||
ini_set("memory_limit", "512M");
|
||||
|
||||
try {
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
<?php
|
||||
register_shutdown_function(
|
||||
create_function(
|
||||
"",
|
||||
"
|
||||
if (class_exists(\"Propel\")) {
|
||||
Propel::close();
|
||||
}
|
||||
"
|
||||
)
|
||||
);
|
||||
|
||||
/*
|
||||
* ProcessMaker Web Application Bootstrap
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user