-B 1000 is very small for a production DB. each buffer is 8k (unless you changed it at compile time) so this is only 8M. My server also runs with 512M of memory, and I run with -B 32000. You may not want it that high, but 1000 is definitely too small.