doutang9037 2018-09-25 08:01 采纳率: 100%
浏览 19

使用Plesk在Debian上使用Symfony 2.8在crontab上运行缓慢的Doctrine 2

i have a performance problem in my symfony 2.8 system. I have a function in a service where i am saving 2 entities and do some other stuff. This function is called from an controller in an POST Request and tooks 0.54 seconds for execution. This is ok but i also have a command, which is called hourly by a cronjob, which calls this function also and then it needs 55 seconds for execution.

How can it be?

In this function i am also dispatching an event that needs 0.04 seconds when called from controller and 18.2 seconds called from command.

My Server runs Debian and Plesk 17.8. I am calling the command with Plesk every Hour with php app/console XXXXXXXX --env=prod. I dont think its a symfony or doctrine problem. It looks likes the cron get only 1 % of the server resources for execution. Has someone an idea?

If i am calling the command manually from the cli the function is as fast as it would be called by the controller.

Thanks in advance.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 素材场景中光线烘焙后灯光失效
    • ¥15 请教一下各位,为什么我这个没有实现模拟点击
    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 保护模式-系统加载-段寄存器