Fwd: {GDG Ghana} RESTFul API on Tomcat not working until restart

14 views
Skip to first unread message

Edward Pie

unread,
Oct 1, 2013, 10:48:15 AM10/1/13
to knust...@googlegroups.com, ucc...@googlegroups.com


---------- Forwarded message ----------
From: Edward Pie <hackst...@gmail.com>
Date: Tue, Oct 1, 2013 at 2:47 PM
Subject: {GDG Ghana} RESTFul API on Tomcat not working until restart
To: ghana...@googlegroups.com


Hello good people,

Am working on a RESTFul API backend to be consumed from an android app.
Its hosted here 

Now my problem : The above url when accessed is supposed to return a json list containing 
a list of rooms. Now this works perfectly on my local server without a problem but once hosted the api doesn't return data until i restart my tomcat server online.

Upon restart, it works perfectly again for some minutes and stops. It returns the json alright but without the rooms.

Any one willing to help can send me his/her bitbucket id so that i can share the code with him/her.

Any help?

Best Wishes,

Edward Pie

--
You received this message because you are subscribed to the Google Groups "GDG Ghana" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ghana-gtug+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Abubakr-Sadik Nii Nai Davis

unread,
Oct 18, 2013, 6:40:11 AM10/18/13
to knust...@googlegroups.com, ucc...@googlegroups.com
Have you fixed the problem?
If not my bitbucket ID be 'stee' without the quotes.

- Nii Nai

Edward Pie

unread,
Oct 18, 2013, 6:43:39 AM10/18/13
to knust...@googlegroups.com

Thanks Sadik, I fixed it with hibernate c3p0. Apparently, mysql closes open connections at regular intervals so i just used it to make it stay open.

You received this message because you are subscribed to the Google Groups "GDG KNUST" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knust-gtug+...@googlegroups.com.

Jojoo Imbeah

unread,
Oct 18, 2013, 7:01:47 AM10/18/13
to knust...@googlegroups.com
Edward, 

I'm interested to know what happens to your memory after the app is subjected to a little bit of load for say 30 minutes. Does the memory stay constant, or does is increase steadily?
--
Jojoo Imbeah
www.kasahorow.org | www.museke.com | ghana.gtugs.org

fie.nipa - Bring out the Africa in you!
http://www.fienipa.com

Edward Pie

unread,
Oct 18, 2013, 7:06:43 AM10/18/13
to knust...@googlegroups.com

I did a benchmark and I found that the memory usage stays constant. The magic had already been done in the c3p0 lib. Am sure it closes the connection when left idle and reopens from a pool when neccessary. That way, nothing is unnecessarily allowed use the memory for breakfast.

Jojoo Imbeah

unread,
Oct 18, 2013, 7:34:39 AM10/18/13
to knust...@googlegroups.com
Tehehe. Awesome!

david as Siddiq

unread,
Oct 18, 2013, 7:50:11 AM10/18/13
to knust...@googlegroups.com

Interesting. Good to know, I hope it logged that fact.

- Nii Nai

Sent from Yahoo Mail on Android



From: Jojoo Imbeah <jojoo....@gmail.com>;
To: <knust...@googlegroups.com>;
Subject: Re: {GDG Ghana} RESTFul API on Tomcat not working until restart
Sent: Fri, Oct 18, 2013 11:01:47 AM
Reply all
Reply to author
Forward
0 new messages