T2v-transformers connection error in the middle of importing thousands of records

I’m using 1.21.3 in docker-compose; REST API with curl (from php); sentence-transformers-multi-qa-MiniLM-L6-cos-v1; on a low-resource VPS host (2 core, 4GB ram, no GPU).

I’m trying to import ~1.3m paragraphs in batches of 100 (let me know if that’s silly small, but I wanted to get batch responses in under 15 seconds each for monitoring; generally takes 7-11 seconds for each batch). It successfully imports 120-170k records and then starts spitting connection errors:

update vector: send POST request: Post “http://t2v-transformers:8080/vectors”: dial tcp 172.22.0.3:8080: connect: connection refused

After such errors if I try to do a query, it returns null, but if I shut down the docker and then bring it back up, it successfully returns answers. How do I diagnose the issue with the transformer server so I can get through all 1.3m paragraphs?

Apologies in advance if I missed something important in the docs.

Hi @dlo ! Welcome to our community :hugs:

Can you see any outstanding logs? How is the resource usage during the import? 4G ram and 2 cores is indeed low resource for this kind of duty, so it might be failing there. :thinking:

CPU usage is very high while it’s running, but I don’t care much if it takes a few days to complete. I wonder if low memory could cause a crash of some kind, but I’m only aware of what the curl request is returning; is there a server log that’s accessible somehow? I’m not very familiar with Docker, so it’s a bit of a black box to me, and I didn’t see clear info in your documentation about server logs (I saw you can set the log level/format using environment variables, but I didn’t see a page explaining how logs are accessed).

Also, the disk is small (48GB), but the Docker container seems to be using only 23GB, so it’s not out of storage as far as I can tell.

If you run:

docker compose logs -f --tail 10

You should get the 10 last lines of log for each service and follow the new ones.

What might be happening is that the inference model is taking too much memory/cpu and maxing out its resources (consider Weaviate will be writing and indexing your data), so a timeout/connection error might be the symptom here.

Also, if you dont care about a quick import, you can try throttling the batches, like on this exampe text2vec-openai | Weaviate - vector database

Let me know if this helps :slight_smile:

1 Like