I have a simple dotnet test command that runs 250 tests on my local machine in about 33 seconds, runs in about 1 minute in bitbucket pipeline but no matter what I do it times out completely in CircleCI.
Before anyone suggests that it could be a dependency that hasn’t launched yet, I can confirm that it has it would be the sql server instance and I know it works fine because the schema is updated and fixtures loaded.
Please help, I am losing my mind with this.
error message I am getting from CircleCI is:
“Too long with no output (exceeded 10m0s): context deadline exceeded”
Can you provide more details about the environment you have defined?
One question that I can think of is where is MSSQL deployed compared to the tests. The reason for asking is that I am not aware of bitbucket providing hosted Windows-based runners so you are either running MSSQL preview for Linux or the database server is a remote target. If remote the issue becomes how remote as a chatty SQL session that takes 33 seconds in a local environment could take hours over a long distance.
Using a docker image for sql server that is designed to run on Linux and provided by microsoft.
The bitbucket pipeline runs on a dedicated linux machine using a private runner, which is the reason why we want to move to CircleCI.
Like I said, this is not an SQL issue but rather a CircleCI issue where the dotnet test will just stop and the output will freeze unexpectedly.
OK, can you post your config.yml file as understanding what machine image and resource_class you are using may help people comment.
Other guesses I can put forward at the moment are
- which resource_class are you using? Medium (2 vCPUs and 7.5GB) may be too small.
- do you have any way to compare the disk performance that MSSQL is seeing across the 3 environments. As I use self-hosted runners I have no real idea how well a CircleCI instance performs when the disks are given a database load.
Knowing the machine image will be of great use to anyone with an understanding of possible dotnet issues - an area I know nothing about.
I am using medium resource_class, but I don’t think this is the problem.
I can build docker images without issues and arguably that takes more memory and CPU.
The database load is very minimal as these are unit and integration tests, basic CRUD operations.
the machine image is: ubuntu-2204:2022.04.2