{{editor}}'s edit
{{editor}}'s edit
Loading...
Sorry, something went wrong.
-
Hello (Please note the Update 1 below) I'm not sure if this is the right place to ask, but I'm a little lost with this mysterious problem... The problem occurs only on the prod server and I was not able to reproduce it locally. Lets say I have a Symfony app (v5.3.10) with a page under The full error response is:
Obviously this error comes from Apache, not from Symfony. But interesting is that if I clear the cache and then request the This problem occurs only on a specific route or controller. So And now I've found 2 other endpoints/controller with the same strange behaviour. It seems that this problem occurs independent from the other controllers. So I can request
I've looked into the server logs but there is nothing logged. So for me it seems like a weird bug with the Symfony cache and Symfony Security in combination with Apache. I'm not sure if someone could help me but I would be glad for every hint what or where I could look next to find the root of this problem. Thank you. Update 1 (2021-11-27)I was able to reproduce the issue on a staging area and looked deeper into the cache problem. I've found out that the problem comes from a specific Doctrine cache. In my case of the This behavior occured first after I switched from doctrine/orm 2.9.5 to 2.10.1, so maybe there is a connection too. This is the content of the cache file: <?php //085f6b9716d8e39e78c0de0dcdefffd8
return [PHP_INT_MAX, static function () { return \Symfony\Component\VarExporter\Internal\Hydrator::hydrate(
$o = [
clone (($p = &\Symfony\Component\VarExporter\Internal\Registry::$prototypes)['Doctrine\\ORM\\Query\\ParserResult'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('Doctrine\\ORM\\Query\\ParserResult')),
clone ($p['Doctrine\\ORM\\Query\\Exec\\SingleSelectExecutor'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('Doctrine\\ORM\\Query\\Exec\\SingleSelectExecutor')),
clone ($p['Doctrine\\ORM\\Query\\ResultSetMapping'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('Doctrine\\ORM\\Query\\ResultSetMapping')),
],
null,
[
'Doctrine\\ORM\\Query\\ParserResult' => [
'_sqlExecutor' => [
$o[1],
],
'_resultSetMapping' => [
$o[2],
],
'_parameterMappings' => [
[
1 => [
0,
],
],
],
],
'Doctrine\\ORM\\Query\\Exec\\AbstractSqlExecutor' => [
'_sqlStatements' => [
1 => 'SELECT count(u0_.id) AS sclr_0 FROM users u0_ WHERE u0_.deleted_at IS NULL AND u0_.created_at > ?',
],
],
'stdClass' => [
'scalarMappings' => [
2 => [
'sclr_0' => 1,
],
],
'typeMappings' => [
2 => [
'sclr_0' => 'integer',
],
],
],
],
$o[0],
[]
); }];
~ |
Beta Was this translation helpful? Give feedback.
{{editor}}'s edit
{{editor}}'s edit
Loading...
Sorry, something went wrong.
-
I'm sure that this is a problem with doctrine/orm or doctrine/dbal, so I created a ticket there, see doctrine/orm#9207. Update: It looks like this problem only occurs with PHP 7.4. After switching to PHP 8, the problem was solved. |
Beta Was this translation helpful? Give feedback.
-
Thank you for this post. The description sound similar to the problem I am facing. So I don't feel so alone and desperate anymore ;-) |
Beta Was this translation helpful? Give feedback.
{{editor}}'s edit
{{editor}}'s edit
Loading...
Sorry, something went wrong.
-
Hello, I ran into this issue the other day as well with a project and I can confirm that swapping the Cache fixes this issue. My hoster digged into this more deeply and came to the conclusion, that the Ion Cube Loader misinterprets the format of the cache files as its own file format, tries to parse it and fails. This crashes the PHP process and hence Apache returns 503. I am not gonna dig into this more deeply as it is supposed to be a PHP 7.4 issue only and we will be on PHP 8.0 soon with this project, but maybe this information saves somebody some hours :-) |
Beta Was this translation helpful? Give feedback.
{{editor}}'s edit
{{editor}}'s edit
Loading...
Sorry, something went wrong.
-
I had the same problem today. Out of nowhere it started 503 Service unavailable but only for some of the Entities in my project, not all of them. Removing PHP 8.1.1 It drives me nuts. I spent with server admin a few hours and what they said it is something from the PHP app. A switched from Redis cache to filesystem and the same issue appears so it is not a Redis problem. In DEV environment, where this cache is not used it works fine. On prod does not. On logs I cannot see anything. Just when it runs query to problematic Entity it disconnecting and throws 503. |
Beta Was this translation helpful? Give feedback.
-
After digging deeper I found that as before, the problem is with So with this setting:
I have 503 error. If I change |
Beta Was this translation helpful? Give feedback.
-
As @bezin wrote, the same situation was here. The server admin finally admitted that IonCube might have been updated recently. The remove it from my PHP setup and it works. |
Beta Was this translation helpful? Give feedback.
{{editor}}'s edit
{{editor}}'s edit
Loading...
Sorry, something went wrong.
-
I have the same error from now on, without changing my scripts. PHP: 8.1.7
Anybody with a solution? |
Beta Was this translation helpful? Give feedback.
-
Please check if the problem only occurs when dealing with DateTimeImmutable property type. |
Beta Was this translation helpful? Give feedback.
-
@justpilot seems not to be the problem... |
Beta Was this translation helpful? Give feedback.
I'm sure that this is a problem with doctrine/orm or doctrine/dbal, so I created a ticket there, see doctrine/orm#9207.
Update: It looks like this problem only occurs with PHP 7.4. After switching to PHP 8, the problem was solved.