New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Out of memory #16734
Comments
|
I could not confirm this, even using a Docker container with very little RAM |
|
Are you using PHP 8.0 with memory_limit = 128M (the default)? The amount of RAM shouldn't matter. |
|
I am trying to debug this on QA but for now did not find any evidence. diff --git a/libraries/classes/DatabaseInterface.php b/libraries/classes/DatabaseInterface.php
index d05d86aee0..eafff3db6f 100644
--- a/libraries/classes/DatabaseInterface.php
+++ b/libraries/classes/DatabaseInterface.php
@@ -237,9 +237,15 @@ class DatabaseInterface implements DbalInterface
syslog(
LOG_INFO,
- 'SQL[' . basename($_SERVER['SCRIPT_NAME']) . ']: '
+ 'SQL[' . basename($_SERVER['SCRIPT_NAME']) . '?route=' . Routing::getCurrentRoute() . ']: '
. sprintf('%0.3f', $time) . '(W:' . $warningsCount . ') > ' . $query
);
closelog();
}
} |
|
Where do these logs show up? I don't see them in |
|
Here is my current hack, they are hard to find but should be in a syslog(
LOG_INFO,
sprintf(
'SQL[%s?route=%s]: %0.3f(W:%s,C:%s,L:0x%02X) > %s',
basename($_SERVER['SCRIPT_NAME']),
Routing::getCurrentRoute(),
$time,
$warningsCount,
$cache_affected_rows ? 'y' : 'n',
$link,
$query
)
);
error_log(
sprintf(
'SQL[%s?route=%s]: %0.3f(W:%s,C:%s,L:0x%02X) > %s',
basename($_SERVER['SCRIPT_NAME']),
Routing::getCurrentRoute(),
$time,
$warningsCount,
$cache_affected_rows ? 'y' : 'n',
$link,
$query
) . PHP_EOL,
3,
ROOT_PATH . '/build/sql-log.txt'
); |
|
And This is ran after the query isn't it? So it won't run for the query that runs out of memory. This might be the culprit: |
#16470 could certainly be the one. |
|
I did some updates to my deploy container to be able to use it locally I think I have reproduced it, depending on my research criteria it crashes or not the fpm thread |
|
Reverting the #16470 fixes the issue cc @ibennetch this issue is release blocking until fixed, working on it |
|
Hi @OlafvdSpek |
Signed-off-by: William Desportes <williamdes@wdes.fr>
|
If the original query is like |
It should not, the replacing will give the same query as the input and count The snapshots are up to date, let me know if you find something I missed |
|
I think I have an idea on how to patch this SELECT COUNT(*) FROM (SELECT * from help_category group by help_category_id) as cntThe would give the maximum rows in an easy way |
|
@ibennetch could you give some advice on this one please ? |
|
See: #16902 I applied this and it works fine |
|
@ibennetch this is the last issue blocking the release, what do you think about my patch ? |
|
Should be fixed by #16902 |



pMA 5.1.1-dev / PHP 8
When trying to browse a large table..
($options == ($options | DatabaseInterface::QUERY_STORE))also looks very curious.The second query without limit is the culprit..
The repeated FOREIGN_KEY_CHECKS query looks sub-optimal too.
The text was updated successfully, but these errors were encountered: