👯 I’m currently working at Carrefour as a Chapter Lead Front
heristop / heri-jobqueue-bundle Goto Github PK
View Code? Open in Web Editor NEWThis Symfony bundle provides the use of Zend Queue from Zend Framework
License: MIT License
This Symfony bundle provides the use of Zend Queue from Zend Framework
License: MIT License
Shouldn't zendframework/zend-queue be in "required" instead of "required-dev" in composer.json?
Defaulting to /usr/bin/php has caused problems for me in that it sometimes doesn't live there. I'd suggest removing the php part of the command so you end up with this:
$process = new Process(sprintf('%s %s %s',
'bin/console', $commandName,
implode(' ', $arguments)
));
This works because the console file has the following:
#!/usr/bin/env php
Which means it's handled in a nicer way.
Cheers!
Hi all,
i'm getting out of memory exceptions after the listener has been running some time. For testing purposes I've set the memory_limit to 32M in the php.ini and the crash occurs after 15-20 minutes after the listener has been started. Im using the bundle with symfony2 on a debian wheezy machine with apache2 and mysql 5. Monitoring the process with top/htop shows that the memory consumption grows slowly but steadily. I'm not sure in which part of the bundle the problem occurs or if it's caused by a wrong configuration.
Here is a stack trace:
php app/console jobqueue:listen --env=dev --quiet jobs
.
.
.
.
;10/15 minutes later
PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 80 bytes) in /var/www/myproject.local/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php on line 129
PHP Stack trace:
PHP 1. {main}() /var/www/myproject.local/app/console:0
PHP 2. Symfony\Component\Console\Application->run() /var/www/myproject.local/app/console:27
PHP 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/myproject.local/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:126
PHP 4. Symfony\Component\Console\Application->doRun() /var/www/myproject.local/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:96
PHP 5. Symfony\Component\Console\Application->doRunCommand() /var/www/myproject.local/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:195
PHP 6. Symfony\Component\Console\Command\Command->run() /var/www/myproject.local/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:886
PHP 7. Heri\Bundle\JobQueueBundle\Command\QueueListenCommand->execute() /var/www/myproject.local/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:259
PHP 8. Heri\Bundle\JobQueueBundle\Service\QueueService->listen() /var/www/myproject.local/vendor/heristop/jobqueue-bundle/Heri/Bundle/JobQueueBundle/Command/QueueListenCommand.php:69
PHP 9. Heri\Bundle\JobQueueBundle\Service\QueueService->loop() /var/www/myproject.local/vendor/heristop/jobqueue-bundle/Heri/Bundle/JobQueueBundle/Service/QueueService.php:243
PHP 10. Heri\Bundle\JobQueueBundle\Service\QueueService->attach() /var/www/myproject.local/vendor/heristop/jobqueue-bundle/Heri/Bundle/JobQueueBundle/Service/QueueService.php:273
PHP 11. ZendQueue\Queue->__construct() /var/www/myproject.local/vendor/heristop/jobqueue-bundle/Heri/Bundle/JobQueueBundle/Service/QueueService.php:102
PHP 12. ZendQueue\Queue->setAdapter() /var/www/myproject.local/vendor/zendframework/zend-queue/library/ZendQueue/Queue.php:127
PHP 13. ZendQueue\Queue->_setName() /var/www/myproject.local/vendor/zendframework/zend-queue/library/ZendQueue/Queue.php:222
PHP 14. Heri\Bundle\JobQueueBundle\Adapter\DoctrineAdapter->isExists() /var/www/myproject.local/vendor/zendframework/zend-queue/library/ZendQueue/Queue.php:493
PHP 15. Doctrine\ORM\EntityRepository->findOneBy() /var/www/myproject.local/vendor/heristop/jobqueue-bundle/Heri/Bundle/JobQueueBundle/Adapter/DoctrineAdapter.php:48
PHP 16. Doctrine\ORM\Persisters\BasicEntityPersister->load() /var/www/myproject.local/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:196
PHP 17. Doctrine\ORM\Internal\Hydration\AbstractHydrator->hydrateAll() /var/www/myproject.local/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php:756
PHP 18. Doctrine\ORM\Internal\Hydration\SimpleObjectHydrator->hydrateAllData() /var/www/myproject.local/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php:140
PHP 19. Doctrine\ORM\Internal\Hydration\SimpleObjectHydrator->hydrateRowData() /var/www/myproject.local/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php:48
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 80 bytes) in /var/www/myproject.local/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php on line 129
Call Stack:
0.0002 241040 1. {main}() /var/www/myproject.local/app/console:0
0.0180 3339712 2. Symfony\Component\Console\Application->run() /var/www/myproject.local/app/console:27
0.0198 3552752 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /var/www/myproject.local/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:126
0.1083 12072280 4. Symfony\Component\Console\Application->doRun() /var/www/myproject.local/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:96
0.1084 12073200 5. Symfony\Component\Console\Application->doRunCommand() /var/www/myproject.local/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:195
0.1127 12249200 6. Symfony\Component\Console\Command\Command->run() /var/www/myproject.local/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:886
0.1132 12255096 7. Heri\Bundle\JobQueueBundle\Command\QueueListenCommand->execute() /var/www/myproject.local/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:259
0.1358 16124016 8. Heri\Bundle\JobQueueBundle\Service\QueueService->listen() /var/www/myproject.local/vendor/heristop/jobqueue-bundle/Heri/Bundle/JobQueueBundle/Command/QueueListenCommand.php:69
1106.5008 33373472 9. Heri\Bundle\JobQueueBundle\Service\QueueService->loop() /var/www/myproject.local/vendor/heristop/jobqueue-bundle/Heri/Bundle/JobQueueBundle/Service/QueueService.php:243
1106.5009 33373776 10. Heri\Bundle\JobQueueBundle\Service\QueueService->attach() /var/www/myproject.local/vendor/heristop/jobqueue-bundle/Heri/Bundle/JobQueueBundle/Service/QueueService.php:273
1106.5009 33374224 11. ZendQueue\Queue->__construct() /var/www/myproject.local/vendor/heristop/jobqueue-bundle/Heri/Bundle/JobQueueBundle/Service/QueueService.php:102
1106.5009 33375072 12. ZendQueue\Queue->setAdapter() /var/www/myproject.local/vendor/zendframework/zend-queue/library/ZendQueue/Queue.php:127
1106.5010 33375072 13. ZendQueue\Queue->_setName() /var/www/myproject.local/vendor/zendframework/zend-queue/library/ZendQueue/Queue.php:222
1106.5010 33375072 14. Heri\Bundle\JobQueueBundle\Adapter\DoctrineAdapter->isExists() /var/www/myproject.local/vendor/zendframework/zend-queue/library/ZendQueue/Queue.php:493
1106.5010 33375376 15. Doctrine\ORM\EntityRepository->findOneBy() /var/www/myproject.local/vendor/heristop/jobqueue-bundle/Heri/Bundle/JobQueueBundle/Adapter/DoctrineAdapter.php:48
1106.5010 33375752 16. Doctrine\ORM\Persisters\BasicEntityPersister->load() /var/www/myproject.local/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:196
1106.5014 33379096 17. Doctrine\ORM\Internal\Hydration\AbstractHydrator->hydrateAll() /var/www/myproject.local/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php:756
1106.5014 33379096 18. Doctrine\ORM\Internal\Hydration\SimpleObjectHydrator->hydrateAllData() /var/www/myproject.local/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php:140
1106.5014 33380120 19. Doctrine\ORM\Internal\Hydration\SimpleObjectHydrator->hydrateRowData() /var/www/myproject.local/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php:48
And here are the relevant parts of the SF2 configuration file:
heri_job_queue:
enabled: true
# max_messages: 1
queues: [ "jobs" ]
#Mono Log System
monolog:
handlers:
main:
type: fingers_crossed
action_level: debug
handler: buffered
buffer_size: 50
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
console:
type: console
Alfred
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.