After Effects Multiple instances hangs when rendering using PHP and Command Line I am trying to render video from Adobe After Effects using PHP through command line. When i try to render video from After effects render Queue, i can see in Task Manager that all CPU cores are using. i have following PHP script which takes AE template file and render video.

&lt;?php
  exec('aerender.exe -project myproject.aepx -comp "Final" -mp  -output video.mov')

 // -mp - Additional processes may be created to render multiple frames simultaneously
?&gt;


When i execute this PHP file from command line like

php /path/to/above_script_file.php


its working fine too. All CPU cores are using and video is rendering.



BUT when i execute same script from browser using WAMP server, rendering starts, all instances get starts but suddenly close and 1 or sometimes 2 After effects instances are running but in hanged position. No memory or CPU is changing. 



These are my After Effects preferences



UPDATE:
When i am trying to render using below command
    aerender -project /path/ -comp Final -mp -output out.mov

its working and using multiprocessing. but when trying to render from web app it show below error message in log file

There is an error in background rendering so switching to foreground rendering after 0 frames completed out of total 601 frames.


Message interpretation:enter link description here

The multiprocessing feature was unable to use all instances beyond a     certain point in the rendering process. This is an error that only shows     in the render log file.
You may want to try to write the output of your task to a file and tell your system to start it as a background task by adding the &amp;:

exec('aerender.exe -project myproject.aepx -comp "Final" -mp  -output video.mov &gt;/dev/null &amp;')

It might also be something in your server setup, the max. memory maybe?