• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

getting gateway timeout while executing a stored procedure via jdbc

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using a struts2 framework which is basically like:-

ActionClass
execute
{
call function in business class which returns an object and store this object in session
redirect to jsp
}

BusinessClass
function()
{
sysout("start");
call a stored procedure via jdbc //this procedure returns 40 cursors and takes 6,7 mins to execute
call setter methods of object and return object
sysout("end");
}

JSP

The problem is that the procedure is taking a lot of time to execute and after that its called again and again because i am getting the sysouts "start"again and again.Finally,I see a gateway timeout error even adding session timeout in web.xml.If i dont put session timeout in web.xml then its throwing null pointer exception in action class while storing the object in session.Also,This problem is happening only after i deployed the code in unix server.In local,its working fine.I am using Tomcat 6.0 as web container.Can someone please explain why the procedure is called many times even though there is no looping.Is it somehow related to the fact that the procedure is returning 40 cursers.

Regards,
Progyan
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The problem is that the procedure is taking a lot of time to execute



Did you try checking the sp on db directly if it is taking lot of time there as well?

Also,This problem is happening only after i deployed the code in unix server.In local,its working fine


can you please elaborate more on this point?

Can someone please explain why the procedure is called many times even though there is no looping.Is it somehow related to the fact that the procedure is returning 40 cursers



from the code , do you mean to say "start" gets printed many times?

Regards,
Amit
 
reply
    Bookmark Topic Watch Topic
  • New Topic