Ken Alton
Ken Alton

Reputation: 734

Double Submit Only on Linux

I have a really weird scenario involving a method that is invoked twice but only happens on Linux(Ubuntu) deployment.

I have two methods, each invoked separately by a button submit. They each take a long time to process. One method loads a list of .xls files, processes and inserts each row to the database (320172 records from 35 xls files). The other method takes an XML file, processes it using XStream to create objects and sends emails to each object generated (823 objects are generated).

Problem doesn't exhibit on dev system (Windows 7, MySQL, smtp4Dev) but when deployed on Linux the method selected gets invoked twice - only twice.

After adding println 'this method was called' + new Date() - the method was called again exactly one minute after the first call (on button click); every time; one minute to the second despite server load.

After exactly one minute, the page returns with '502 - bad gateway' yet the process(es) continue (I see continued DB inserts and continued emails (changing recipient address to my email in an attempt to debug).

Each method works but it does it twice (duplicate (not triplicate or more) DB records and emails) and I've no idea why they're being called twice.

Each deployment is using Struts 2 and the methods do NOT begin with 'get' so it's unlikely to be a JSON issue (JSON is not used on the particular pages and in a desparate bug-fixing attempt, commented out all JSON results in the struts.xml for that action). Both deployments are running on Tomcat.

Upvotes: 1

Views: 43

Answers (0)

Related Questions