500 error trying to export a large query

LabKey Support Forum
500 error trying to export a large query Brian Connolly  2012-01-27 14:56
Status: Closed
 
Michael,

The problems you are experiencing are most likely being caused by the configuration of your PostgreSQL server. From the configuration file that you sent me, it looks like the database is using the default configuration.

The default configuration for PostgreSQL is meant to work on servers with 512MB or memory or less. If you change the configuration of your PostgreSQL server, the performance of you server will likely improve.

Documentation on tuning your postgresql server is available at

http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server and https://www.packtpub.com/article/server-configuration-tuning-postgresql

If you do not want to take the time to review all the documentation above, changing the following settings should provide a significant performance improvement

-shared_buffers = 12% of total memory size(but no larger than 2GB)
-work_mem = 10MB
- maintenance_work_mem = 1024MB
- wal_buffers = 4MB
- checkpoint_segments = 10   
- checkpoint_timeout = 15min
- enable_material = off
random_page_cost = 1.5
- effective_cache_size = 75% of total memory size

NOTE: I know very little information about your server configuration and other programs running on the server, so I recommend consulting with your DBA/System Administrator before making these changes. Or using these values as a starting point and evaluating the server performance after making the change.

Lastly, I would recommend reducing the Max Heap setting in Tomcat to either 12 or 16GB as the PostgreSQL database will now be using more of the servers memory.

-Brian