X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id B9A4ED1E970 for ; Fri, 16 Apr 2004 18:30:00 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 94573-03 for ; Fri, 16 Apr 2004 18:29:55 -0300 (ADT) Received: from cloverworxs.com (net-6621934-133.customer.corenap.com [66.219.34.133]) by svr1.postgresql.org (Postfix) with ESMTP id EE6C6D1E947 for ; Fri, 16 Apr 2004 18:29:56 -0300 (ADT) Received: from [65.67.51.65] (HELO cloverworxs.com) by cloverworxs.com (CommuniGate Pro SMTP 3.5.8) with ESMTP-TLS id 380837 for pgsql-jdbc@postgresql.org; Fri, 16 Apr 2004 16:27:04 -0500 Message-ID: <40805043.6020502@cloverworxs.com> Date: Fri, 16 Apr 2004 16:29:39 -0500 From: Tao Yang User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Out of memory exception Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/201 X-Sequence-Number: 9930 Hi, First I would like to think you for your wonderful work on Postgresql and the jdbc driver, it is all wonderful. We run into a particular problem when I try to upload a big size blob into the postgresql. In our web application, we allow user to upload file to the server which we store it as Blob inside the postgresql database. during the test, we find if the file size is too big, then an "OutOfMemory" exception will be thrown. I tried to increase the jvm heap size from the default 64MB (on linux) to 96MB, 128MB, and 512MB, it does help a bit, but not resolve it unfortunately - I could upload a file of size of 2MB when it is 96MB heap size, and 13MB when it is 512MB (only once, when I do it 2nd time in a row, it failed again with that "OutOfMemory" error). then I tried against MS SQL Server, it does not have this problem at all - with the default jvm size, it handles that 13MB file very well. all other code is the same for posgresql and mssql in our app except loading the driver. Is there any possibility the postgresql jdbc driver does not handle large object very well, for example, use stream for loading that big file? Do you have any clue why we have those problems? Thanks a lot, Tao