Closed pkptzx closed 6 years ago
emmmmmmm....
need to optimization ....
hate
& despise
hibernate ....
close it , because i think u won't change it
Thanks for reporting this - I'm going to re-open it, because stuff like this should be tracked.
Can you give a little more detail?
In the meantime, you could try raising the -Xmx
parameter to the application. If you're using the RPM, edit /opt/holdmail/bin/holdmail.conf and change the line
JAVA_OPTS=-Dloader.path=/opt/holdmail/lib
to
JAVA_OPTS="-Dloader.path=/opt/holdmail/lib -Xmx1024m"
And restart the holdmail service (note the addition of quotes around the whole value). Adjust Xmx for your use case..
It's possible (but unlikely) that the issue is with the h2 DB. You could switch out to something like mysql (see README on homepage for instructions) to see if the issue persists.
If you do any investigate or profiling, we'd love to see your notes!
I understand you may be frustrated at the speed of changes to holdmail, but it will get looked at eventually - volunteers welcome!
Another question is are you using Pagination in the rest api?
@kblief @barryoneill
java -jar -Xms1500m -Xmx1500m ...
and change search emaillist pagesize = 10.two application access rest api , interval 100 second. (during this period for test, everyday just new 2-10 mail , attachment size 10-200k) but holdmail server already have 28516 mail.... have 20000+ is spam mail...
today exception:
why? Server just have a holdemail , not have other service.
I don't have the experience of using h2.
why not attachment save to file system?
In our company , prohibited .
@pkptzx can you push your maven branch up to github?
You can try changing the connection pool.
There are improvements to be made in the backend with regards to mails. If you're trying out master, some changes made in recent months should have improved things (not delivering the full RAW message in the summary), but further work can be done.
In general, it's a tradeoff in performance vs flexibility. On message receive, we could parse out and store html, text, and attachment metadata in the model. That would eliminate the need to query the raw column at all, except when fetching actual RAW or attachment content. However, that means more parsing and storing of metadata, which itself is a maintenance concern. Let's check that nothing more obvious is going on before re-architecting the backend:)
@kblief WOW....
h2 db is not working...not even after restart...
I found h2 db file size 2.1G ......
I can only delete it ... restart then normal...
h2 is really only good for unit testing, and small deployments. Once you are in a production like setup, its really important to move to an externally managed DB. In our deployment, we're using MySQL. We now feed 7 different environments into a single holdmail instance. Outside of doing a message purge to clean up the DB size we have not seen any major performance hiccups. Granted, the bulk of our use case is message ingestion and not querying.
when more user access restful api , then OOM....
another app through holdmail rest api find new mail , soon after OOM or rest can't access but email smtp is work.