pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
[pgvector/pgvector] issue #831: Creating the HNSW index causes "psycopg.OperationalError: consuming input failed: SSL SYSCALL error: EOF detected"
6+ messages / 2 participants
[nested] [flat]

* [pgvector/pgvector] issue #831: Creating the HNSW index causes "psycopg.OperationalError: consuming input failed: SSL SYSCALL error: EOF detected"
@ 2025-04-28 08:01 "TopCoder2K (@TopCoder2K)" <noreply+TopCoder2K@github.com>
  0 siblings, 0 replies; 6+ messages in thread

From: TopCoder2K (@TopCoder2K) @ 2025-04-28 08:01 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

I've already searched for possible causes, so I've looked at
- [Creating an HNSW index causes SSL error](https://github.com/pgvector/pgvector/issues/307)
- [Postgres SSL SYSCALL error: EOF detected with python and psycopg](https://stackoverflow.com/questions/24130305/postgres-ssl-syscall-error-eof-detected-with-python-and...)

but it seems I don't have any direct problems with network, CPU or RAM.

### My case
I run the following (real names have been removed):
```
CREATE INDEX my_index ON my_table USING hnsw (my_column sparsevec_ip_ops) WITH (m = 64, ef_construction = 512)
```
and get the error after around 35 minutes. Relevant logs from `/var/log/postgresql/postgresql-12-main.log` are:
```
[3251] LOG:  server process (PID 2557861) was terminated by signal 11: Segmentation fault
[3251] DETAIL:  Failed process was running: CREATE INDEX my_index ON my_table USING hnsw (my_column sparsevec_ip_ops) WITH (m = 64, ef_construction = 512)
```
The HNSW index was successfully  created on the same table with `m = 64, ef_construction = 256` after working for about 6 hours, therefore, the error may be caused by some memory issues. However, I was monitoring the RAM during the index creation and it wasn't exceeding 10% of the total RAM.
Also, I don't believe there are problems with the connection, but I tried to set
```
        keepalives_idle=28_800,  # 8 hours
        keepalives_interval=3600,  # 1 hour
```
and it didn't help.

Could you please advise me which settings I should check and what can be the cause of the error?

#### Set up
```
PostgreSQL        12.17
psycopg           3.2.6
psycopg-binary    3.2.6
pgvector          0.4.0
```

^ permalink  raw  [nested|flat] 6+ messages in thread

* Re: [pgvector/pgvector] issue #831: Creating the HNSW index causes "psycopg.OperationalError: consuming input failed: SSL SYSCALL error: EOF detected"
@ 2025-05-02 19:58 ` "ankane (@ankane)" <noreply+ankane@github.com>
  4 siblings, 0 replies; 6+ messages in thread

From: ankane (@ankane) @ 2025-05-02 19:58 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Hi @TopCoder2K, what version of pgvector are you on? (it looks like you shared the Python library version instead of the server version)

^ permalink  raw  [nested|flat] 6+ messages in thread

* Re: [pgvector/pgvector] issue #831: Creating the HNSW index causes "psycopg.OperationalError: consuming input failed: SSL SYSCALL error: EOF detected"
@ 2025-05-03 07:10 ` "TopCoder2K (@TopCoder2K)" <noreply+TopCoder2K@github.com>
  4 siblings, 0 replies; 6+ messages in thread

From: TopCoder2K (@TopCoder2K) @ 2025-05-03 07:10 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@ankane, sorry, I forgot about this. The relevant row from `\dx` is
```
 vector      | 0.7.3   | public     | vector data type and ivfflat and hnsw access methods
```

^ permalink  raw  [nested|flat] 6+ messages in thread

* Re: [pgvector/pgvector] issue #831: Creating the HNSW index causes "psycopg.OperationalError: consuming input failed: SSL SYSCALL error: EOF detected"
@ 2025-05-03 07:17 ` "ankane (@ankane)" <noreply+ankane@github.com>
  4 siblings, 0 replies; 6+ messages in thread

From: ankane (@ankane) @ 2025-05-03 07:17 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Try upgrading to 0.7.4, which fixed #635.

^ permalink  raw  [nested|flat] 6+ messages in thread

* Re: [pgvector/pgvector] issue #831: Creating the HNSW index causes "psycopg.OperationalError: consuming input failed: SSL SYSCALL error: EOF detected"
@ 2025-05-05 06:45 ` "TopCoder2K (@TopCoder2K)" <noreply+TopCoder2K@github.com>
  4 siblings, 0 replies; 6+ messages in thread

From: TopCoder2K (@TopCoder2K) @ 2025-05-05 06:45 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Upgrading to 0.7.4 indeed helped: the index has been built in about ≈8 hours. Thank you!

^ permalink  raw  [nested|flat] 6+ messages in thread

* Re: [pgvector/pgvector] issue #831: Creating the HNSW index causes "psycopg.OperationalError: consuming input failed: SSL SYSCALL error: EOF detected"
@ 2025-05-05 06:45 ` "TopCoder2K (@TopCoder2K)" <noreply+TopCoder2K@github.com>
  4 siblings, 0 replies; 6+ messages in thread

From: TopCoder2K (@TopCoder2K) @ 2025-05-05 06:45 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@TopCoder2K closed this.

^ permalink  raw  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2025-05-05 06:45 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-04-28 08:01 [pgvector/pgvector] issue #831: Creating the HNSW index causes "psycopg.OperationalError: consuming input failed: SSL SYSCALL error: EOF detected" "TopCoder2K (@TopCoder2K)" <noreply+TopCoder2K@github.com>
2025-05-02 19:58 ` "ankane (@ankane)" <noreply+ankane@github.com>
2025-05-03 07:10 ` "TopCoder2K (@TopCoder2K)" <noreply+TopCoder2K@github.com>
2025-05-03 07:17 ` "ankane (@ankane)" <noreply+ankane@github.com>
2025-05-05 06:45 ` "TopCoder2K (@TopCoder2K)" <noreply+TopCoder2K@github.com>
2025-05-05 06:45 ` "TopCoder2K (@TopCoder2K)" <noreply+TopCoder2K@github.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox