8000 [2.2] some deprecations logs make my log file huge · Issue #7259 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[2.2] some deprecations logs make my log file huge #7259
Closed
@bamarni

Description

@bamarni

When requesting a page on a staging server, apache returns a 500 because there is a huge log file being generated, the php memory limit is getting reached.

I can see the generated log file size is 170 Megabytes, even after deleting it and re-requesting, it fails again and regenerates this same huge log file.

It looks like it's because of some deprecation traces, they contain a long stack trace in JSON, is it intended?

For example this one :

[2013-03-04 16:57:52] deprecation.WARNING: UserPassword class in Symfony\Compone
nt\Security\Core\Validator\Constraint namespace is deprecated since version 2.2 
and will be removed in 2.3. Use the Symfony\Component\Security\Core\Validator\Co
nstraints\UserPassword class instead. {"type":-100,"stack":[{"function":"handle"
,"class":"Symfony\\Component\\HttpKernel\\Debug\\ErrorHandler","type":"->","args
":[16384,"UserPassword class in Symfony\\Component\\Security\\Core\\Validator\\C
onstraint namespace is deprecated since version 2.2 and will be removed in 2.3. 
Use the Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPassword
 class instead.","/home/acme.com/test/vendor/symfony/symfony/src/Symfony/Compon
ent/Security/Core/Validator/Constraint/UserPassword.php",25,{"options":"NULL"}]}
,{"file":"/home/acme.com/test/vendor/symfony/symfony/src/Symfony/Component/Secu
rity/Core/Validator/Constraint/UserPassword.php","line":25,"function":"trigger_e
rror","args":["UserPassword class in Symfony\\Component\\Security\\Core\\Validat
or\\Constraint namespace is deprecated since version 2.2 and will be removed in 2.3. Use the Symfony\\Component\\Security\\Core\\Validator\\Constraints\\UserPassword class instead.",16384]},{"file":"/home/acme.com/test/vendor/friendsofsymfony/user-bundle/FOS/UserBundle/Form/Type/ProfileFormType.php","line":39,"function":"__construct","class":"Symfony\\Component\\Security\\Core\\Validator\\Constraint\\UserPassword","type":"->","args":[]},{"file":"/home/acme.com/test/src/Acme/UserBundle/Form/Type/ProfileFormType.php","line":15,"function":"buildForm","class":"FOS\\UserBundle\\Form\\Type\\ProfileFormType","type":"->","args":[{"username":"NULL","email":"NULL","country":"NULL","locality":"NULL","birthday":"NULL","sexe":"NULL","presentation":"NULL","avatar":"NULL","site":"NULL","site_description":"NULL","plainPassword":"NULL","plainPasswordConfirm":"NULL"},{"block_name":"NULL","data_class":"Acme\\UserBundle\\Entity\\User","empty_data":"[object] (Closure: {})","trim":"true","required":"true","read_only":"false","disabled":"false","max_length":"NULL","pattern":"NULL","property_path":"NULL","mapped":"true","by_reference":"true","error_bubbling":"true","label":"NULL","attr":[],"label_attr":[],"virtual":"false","compound":"true","translation_domain":"NULL","error_mapping":[],"validation_constraint":"NULL","constraints":[],"cascade_validation":"false","invalid_message":"This value is not valid.","invalid_message_parameters":[],"extra_fields_message":"This form should not contain extra fields.","post_max_size_message":"The uploaded file was too large. Please try to upload a smaller file.","csrf_protection":"true","csrf_field_name":"_token","csrf_provider":"[object] (Symfony\\Component\\Form\\Extension\\Csrf\\CsrfProvider\\SessionCsrfProvider: {})","intention":"profile","validation_groups":["Profile","Default"]}]},{"file":"/home/acme.com/test/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormType.php","line":167,"function":"buildForm","class":"Acme\\UserBundle\\Form\\Type\\ProfileFormType","type":"->","args":[{"username":"NULL","email":"NULL","country":"NULL","locality":"NULL","birthday":"NULL","sexe":"NULL","presentation":"NULL","avatar":"NULL","site":"NULL","site_description":"NULL","plainPassword":"NULL","plainPasswordConfirm":"NULL"},{"block_name":"NULL","data_class":"Acme\\UserBundle\\Entity\\User","empty_data":"[object] (Closure: {})","trim":"true","required":"true","read_only":"false","disabled":"false","max_length":"NULL","pattern":"NULL","property_path":"NULL","mapped":"true","by_reference":"true","error_bubbling":"true","label":"NULL","attr":[],"label_attr":[],"virtual":"false","compound":"true","translation_domain":"NULL","error_mapping":[],"validation_constraint":"NULL","constraints":[],"cascade_validation":"false","invalid_message":"This value is not valid.","invalid_message_parameters":[],"extra_fields_message":"This form should not contain extra fields.","post_max_size_message":"The uploaded file was too large. Please try to upload a smaller file.","csrf_protection":"true","csrf_field_name":"_token","csrf_provider":"[object] (Symfony\\Component\\Form\\Extension\\Csrf\\CsrfProvider\\SessionCsrfProvider: {})","intention":"profile","validation_groups":["Profile","Default"]}]},{"file":"/home/acme.com/test/vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormType.php","line":126,"function":"buildForm","class":"Symfony\\Component\\Form\\ResolvedFormType","type":"->","args":[{"username":"NULL","email":"NULL","country":"NULL","locality":"NULL","birthday":"NULL","sexe":"NULL","presentation":"NULL","avatar":"NULL","site":"NULL","site_description":"NULL","plainPassword":"NULL","plainPasswordConfirm":"NULL"},{"block_name":"NULL","data_class":"Acme\\UserBundle\\Entity\\User","empty_data":"[object] (Closure: {})","trim":"true","required":"true","read_only":"false","disabled":"false","max_length":"NULL","pattern":"NULL","property_path":"NULL","mapped":"true","by_reference":"true","error_bubbling":"true","label":"NULL","attr":[],"label_attr":[],"virtual":"false","compound":"true","translation_domain":"NULL","error_mapping":[],"validation_constraint":"NULL","constraints":[],"cascade_validation":"false","invalid_message":"This value is not valid.","invalid_message_parameters":[],"extra_fields_message":"This form should not (...)

The strange thing is that I can't reproduce this locally, even with the same database dump than the staging server, both projects are to the same git hash and vendors installed from the same composer.lock file, but my local environment is not exactly the same so maybe it's related to a PHP/system setting?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0