Question

I'm just learning ASP.NET using VB 2010, and although I've had a lot of good progress, I am stumped by one issue that I can't resolve. I've also the web for answers, but I haven't found anything that is exactly what I am dealing with. ...though I may not be using the correct search terms.

Anyway, this is an app that will run on our company internet site which requires users to enter information into text boxes and click a button to accept it. Then it will show a modal pop-up asking the user to confirm. The pop-up has a "Confirm" button and a "Cancel" Button. The cancel button works immediately (hides the confirmation pop-up), but the confirm button hangs up for several seconds before it moves to the next step, which is a modal "Thank You" pop-up. The Confirm button writes data to a database.

Now, that's how it works inside the development environment. However, when it's on the production server, it will sit there for who-knows-how-long before it does anything. I can tell that it is writing to the database, and then displaying the data on the page, but the Confirmation pop-up stays up, and the Thank You pop-up never shows up. Also, the app is supposed to send an email to the user as acknowledgement, but it doesn't do that.

When it hangs up like this, I have never waited long enough to see when it catches up. And when it's live like that, I don't know of a way to debug it.

More info about the page: There are several update panels, one that responds to a timer tick every second to update fields on the page. The others are set to "conditional," being updated by other events. For example, the Confirmation and Thank You modals are in conditional update panels which respond to different events.

So I have two questions: Can anyone advise me about the hangup, and is there a way to debug from a live site? Oh, and maybe a third: Can you have too many update panels?

Update: Follow up question: Can it be going off on a different thread, going off track from the correct thread? I've never really understood threading, but this seems like a possibility.

Was it helpful?

Solution 2

My bad. I hadn't mentioned one aspect, because I had no idea it would be a factor, but it is. Part of the process was to log certain events into a log file. The way it's set up in our IIS, that's a big no-no. So it was throwing an error, but the error was only manifesting itself as a long delay. I commented out the code that opens, writes to, and closes the log file, and it's all good.

OTHER TIPS

This could be any number of things, so it's going to probably be something you're going to need to dive into and troubleshoot and it's probably not something we'll be able to help with too much.

First, the obligatory request: please post your code :)

Now, something that works quickly and dev and slowly in production is usually a resource issue or a code/data issue. First, take a quick look at the server and make sure it's up to the task for multiple users and all of that. It's worth a quick look, but it's usually an issue with the code or data.

What is that update command doing? Is the SQL behind it written well and efficiently? Are there any database locks that might be happening where another user is doing something and your code is actually waiting for it to complete before doing the updating? How many rows are in the database / how many are being effected?

I'd start by running a SQL trace to see what's really happening and to get an ideas as to how many database calls there are an how long each one takes to execute. If that's not the answer, look at the VB code and see if it's efficiently written. If not, go back to the server resources. Without seeing any code or having any idea what the application is supposed to do, I'd bet on the database queries being the culprit.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top