0

I'm trying to insert a few thousand records in a simple table structure into a postgres table. In my c# unit test I create a fresh database from the latest docker alpine image, and then using NPGSQL create a table try and insert a few thousand record.

After about 11k records the container seems to hang, and eventually the test times out. The container logs show nothing after it stops inserting records.

At first I thought it was NPGSQL, however the same test on a normal (non docker) database works fine, so it must be related to the docker image? I've tried several different settings for docker memory/cpu's and also shared_buffers and max_connections for example for the postgres db. The test hangs on the same number of inserts regardless.

I realise bulk inserts are better done with the COPY command, but for this test multiple inserts are relevant.

NpgSql 5.0.7 PostgreSQL 13.3 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424, 64-bit

1 Answer 1

0

After noticing that more operations were timing out. I uninstalled docker, rebooted my machine and reinstalled docker. This seems to have solved the issue for now.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.