Ticket #411 (new defect)

Opened 2 years ago

Growing memory consumption when using ryanc/db.plt

Reported by: yvesf-racket@… Owned by: ryanc
Priority: major Milestone:
Component: ryanc/db.plt Keywords:
Cc: Version:
Racket Version:

Description

I experience Memory Leaks while using db.plt with postgresql.

Checked using racket 5.2 on FreeBSD and Racket 5.1.3 on Debian wheezy.

Test-Program:

#lang racket/base
(require (prefix-in db: (planet ryanc/db:1:4)))

(define pgc
     (db:postgresql-connect
       #:user "ebus" #:database "ebus" #:password "ebus" #:socket "/tmp/.s.PGSQL.5432"));; or #:server - no difference

(define (pgc-test)
      (db:query-value pgc "SELECT 1"))

(let loop ()
      (let ([x (pgc-test)])
              (loop)))

Memory usage grows with the number of database querys (more querys -> grows faster) until the process die.

As a workaround i'm using synx/libpq right now, but i would db.plt because it looks more mature and uses the postgresql wire-protocol instead of FFI bindings.

---

Another smaller issue i ran into: FreeBSD is not marked as a supported platform for socket-connections.

Note: See TracTickets for help on using tickets.