• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Different behavior, remote vs. local

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using ehcache to store a complicated object in memory the first time somebody hits the servlet. It takes almost 20 seconds to build.

When I do local testing, any return hits to the servlet pull the object out of cache instantly. However, when I upload the WAR file to a remote server, the server spends a long time doing who knows what, then it dishes out the HTML. My object appears to be pulled from the cache, but it just takes about 40 sec.

Strangly enough, if I use this remote server directly (ie, I am physically at the machine), the object is pulled from the cache instantly as it should.

Why is this behaving differently on a remote connection as opposed to a local connection?

I'm using Tomcat, btw.
[ June 22, 2006: Message edited by: Trevor Price ]
 
Sheriff
Posts: 67595
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds as if your code is making some assumption that is true when the server and client systems are the same system, but not when they are different systems. What that might be, I have no way of knowing, but it's something for you to start with...
 
Trevor Price
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Found the problem by setting timers all over the place. The cache had nothing to do with it. I had set a very small response buffer size and was outputting lots and lots of code, which takes a long time over an Internet connection.

Which leads me to another question...
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic