I just setup my Codebuild pipeline for PHP Symfony2 testing by phpunit.
Situation :
Some of our tests talk to a local Database (classic mysql-server)
Codebuild use our Custom Docker image that is based on php:5.6-apache
OS : Linux Alpine
PHP VERSION : 5.6
We execute these steps :
- Pull sources
- Setup database (All okey no latency)
- Composer install (5 min)
php app/console doctrine:schema:update --force
php app/console broadway:event-store:schema:init
- Launch phpUnit.
On local environment (Docker with 6GB RAM Allow) everything is okey.
The whole process takes like 15 Minutes... perfect.
Problem :
When i launch the build on the same image on AWS-CodeBuild this is very much longer :
- Pull sources (Instant)
- Setup database (Instant)
- Composer install (5min)
php app/console doctrine:schema:update --force
(14 min)php app/console broadway:event-store:schema:init
(Instant)- phpUnit (Infinity CodeBuild timeout)
Hypothesis :
It seems like all php process that access to the DB is super slow.
Classic MySQL requests have a 'normal' speed...
If someone got an idea ?
Thanks for your help
@Rops42