Received: from pixinguinha.radix.com.br ([200.133.34.111]) by hub.org (8.10.1/8.10.1) with SMTP id e7ECKvu07796 for ; Mon, 14 Aug 2000 08:20:59 -0400 (EDT) Received: (qmail 27822 invoked from network); 14 Aug 2000 12:19:50 -0000 Received: from unknown (HELO radix.com.br) (200.249.104.8) by 200.133.34.21 with SMTP; 14 Aug 2000 12:19:50 -0000 Message-ID: <39705864.8CABD64F@radix.com.br> Date: Sat, 15 Jul 2000 09:26:13 -0300 From: Nelson Ferreira Jr X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: JDBC - error reading BLOBs Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200008/88 Hi, I got the following error when reading BLOBs from a database. Everything works fine when there is a few concurrent requests, but when putting the servlet in a heavy-load situation, I got the following errors: ERROR: lo_tell: invalid large object descriptor (0) ERROR: lo_close: invalid large obj descriptor (1) ERROR: lo_read: invalid large obj descriptor (1) ERROR: lo_lseek: invalid large obj descriptor (1) It only happens with 10 or more concurrent requests, and about 5% of the requests fails. Here is the code: -------------------------------------------------------------------- con.setAutoCommit(false) pstmt =con.prepareStatement(query_gif); ResultSet rs_gif = pstmt.executeQuery(); if (rs_gif.next()) { BufferedInputStream gifDados = new BufferedInputStream(rs_gif.getBinaryStream("GIF")); byte[] buf =new byte[4*1024]; //4Kb buffer int tam; while ((tam =gifDados.read(buf,0,buf.length)) != -1){ out.write(buf,0,tam); // Its the PrintWriter of my Servlet } } con.setAutoCommit(true); -------------------------------------------------------------------- I am runnig postgreSQL 7.0.2 on a RedHat 6.2 linux Thanks