file "killed" a few seconds after it's generated

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 200dogz
    New Member
    • Oct 2008
    • 52

    file "killed" a few seconds after it's generated

    Hi,

    I have a aspx page that generates reports with the data it gets from databases.

    It used to work quick and fine until recently when a file is generated it gets killed a few seconds after that. It can still be downloaded if fast enough:



    A few seconds later...



    The interesting thing is that only reports that are approximately larger than 1MB would get destroyed. Small reports would stay there forever until it's downloaded.

    At first I thought the server might be out of space/memory to store the created report and asked the server admin to check. I didn't get a reply from him so it's probably caused by something else.

    If anyone knows a possible reason for this problem please let me know; I've stucked on this for almost a week =(

    Thanks
    Last edited by Frinavale; Feb 18 '09, 04:46 PM. Reason: Moved to ASP.NET Answers from Networking
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #2
    Well, I'm not sure this is the right forum for the question, but let's try to narrow down the issue before we figure out where you could get the best help - then I can just move the whole thread to the proper forum.

    Do you have access to the source code?

    When, approximately did the issue start?

    Around the time the issue started, did the system change - anything from new programs to something as small as a reboot? Or even a network change?

    Are Windows updates enabled, and if so, automatically download and install?

    Comment

    • 200dogz
      New Member
      • Oct 2008
      • 52

      #3
      Originally posted by sicarie
      Well, I'm not sure this is the right forum for the question, but let's try to narrow down the issue before we figure out where you could get the best help - then I can just move the whole thread to the proper forum.

      Do you have access to the source code?

      When, approximately did the issue start?

      Around the time the issue started, did the system change - anything from new programs to something as small as a reboot? Or even a network change?

      Are Windows updates enabled, and if so, automatically download and install?
      Yes, I have access to the source code through the networks, but don't have the right to get into the server or IIS. It started about a week ago; not sure if there's any changes/reboot made. I assume Windows updates are disabled since the server is not connected to the Internet.

      Comment

      • sicarie
        Recognized Expert Specialist
        • Nov 2006
        • 4677

        #4
        Have you attempted to run the code on a test box and ensure this report is created properly with the code you have?

        Comment

        • 200dogz
          New Member
          • Oct 2008
          • 52

          #5
          Originally posted by sicarie
          Have you attempted to run the code on a test box and ensure this report is created properly with the code you have?
          The reports have always been fine. It's just recently that reports that are greater than approximately 1MB are getting killed by the server. They can still be downloaded if quick enough. By the way for the same report with the same size that doesn't "always" get deleted.

          Comment

          • sicarie
            Recognized Expert Specialist
            • Nov 2006
            • 4677

            #6
            Yeah. I'm trying to isolate this issue to where/how the code interacts with the server. If it was successful on a "test" IIS box that you had control over, then I'd say check out the build of the other server it's on.

            If it's still not successful, then I'd recommend looking at the update status of the devices.

            That's all I can really think of, but I'll ask for some help - see if anyone else can pin this down a bit better.

            Comment

            • 200dogz
              New Member
              • Oct 2008
              • 52

              #7
              Originally posted by sicarie
              Yeah. I'm trying to isolate this issue to where/how the code interacts with the server. If it was successful on a "test" IIS box that you had control over, then I'd say check out the build of the other server it's on.

              If it's still not successful, then I'd recommend looking at the update status of the devices.

              That's all I can really think of, but I'll ask for some help - see if anyone else can pin this down a bit better.
              Unfortunately I don't have administrative access to the server =(. I've been asking our admin to check if there's any problem he can identify the problem but there hasn't been any outcome. I'm trying to figure out a possible reason and resolution before I ask our admin to check again.

              By the way there's indeed a pretty big chance that it is an IIS issue since IIS 6 was reinstalled and reconfigured on the server a few weeks ago.

              Comment

              • sicarie
                Recognized Expert Specialist
                • Nov 2006
                • 4677

                #8
                Originally posted by 200dogz
                Unfortunately I don't have administrative access to the server =(. I've been asking our admin to check if there's any problem he can identify the problem but there hasn't been any outcome. I'm trying to figure out a possible reason and resolution before I ask our admin to check again.

                By the way there's indeed a pretty big chance that it is an IIS issue since IIS 6 was reinstalled and reconfigured on the server a few weeks ago.
                Ah, I see. So you don't have access to any sort of test IIS server either?

                I'm sorry to say I think the resolution here will be to rework the code and request for a 'standard build' on servers so that re-installs won't affect the apps.

                I did, however, ask other Mods/Experts to drop in and take a look, so maybe someone else will catch something I didn't.

                Comment

                • NeoPa
                  Recognized Expert Moderator MVP
                  • Oct 2006
                  • 32654

                  #9
                  You may already realise this, but I think whatever the problem is, is something we don't know about yet.

                  As Sicarie says, I think you need to get the issue clarified internally (with your admin) before asking for help, as we're in no position really to see what may be wrong.

                  You may get lucky and find someone who has had something similar enough for them to recognise your problem and help, but otherwise there's not enough here to work on I'm afraid.

                  Good luck anyway.

                  Comment

                  • Frinavale
                    Recognized Expert Expert
                    • Oct 2006
                    • 9749

                    #10
                    Where are you storing the reports?
                    As physical files on the server?
                    Or are you storing them in memory (in Session)?

                    If you're storing the files in Session, then it may be growing too large. This could cause the worker process to be recycled, you would lose the file along with anything else in Session. I'd recommend storing the files physically in a temporary folder instead.

                    Comment

                    • 200dogz
                      New Member
                      • Oct 2008
                      • 52

                      #11
                      Originally posted by Frinavale
                      Where are you storing the reports?
                      As physical files on the server?
                      Or are you storing them in memory (in Session)?

                      If you're storing the files in Session, then it may be growing too large. This could cause the worker process to be recycled, you would lose the file along with anything else in Session. I'd recommend storing the files physically in a temporary folder instead.
                      Hey Frinavale I think you are probably right!

                      This is what's being used to output the file:

                      Code:
                      HttpContext context = HttpContext.Current;
                      context.Response.Clear();
                      context.Response.AppendHeader("Content-Type", "application/msword");
                      context.Response.AppendHeader("Content-disposition", "attachment; filename=\"report.doc\"");
                      context.Response.Write(this.document);
                      context.Response.BufferOutput = true;
                      context.Response.Flush();
                      context.Response.Close();
                      I will ask our admin to increase the memory allowance for each process in IIS first and see if it fixes the problem :).

                      Comment

                      • 200dogz
                        New Member
                        • Oct 2008
                        • 52

                        #12
                        Umm...the problem seems to be gone after...a server reboot.

                        That probably means it's a resource issue?

                        Anyway, I believe the same problem is going to pop up again in the future but as long as there's way to resolve it I guess it's all good :)

                        Many thanks

                        Comment

                        • NeoPa
                          Recognized Expert Moderator MVP
                          • Oct 2006
                          • 32654

                          #13
                          ... Unless the reboot is required because of your code being resource hungry, or maybe untidy (not releasing resources it has finished with).

                          If that is the case, this is likely to recur.

                          It could all be entirely unconnected with your code too, of course.

                          Comment

                          • Frinavale
                            Recognized Expert Expert
                            • Oct 2006
                            • 9749

                            #14
                            Originally posted by 200dogz
                            Hey Frinavale I think you are probably right!

                            This is what's being used to output the file:

                            Code:
                            HttpContext context = HttpContext.Current;
                            context.Response.Clear();
                            context.Response.AppendHeader("Content-Type", "application/msword");
                            context.Response.AppendHeader("Content-disposition", "attachment; filename=\"report.doc\"");
                            context.Response.Write(this.document);
                            context.Response.BufferOutput = true;
                            context.Response.Flush();
                            context.Response.Close();
                            I will ask our admin to increase the memory allowance for each process in IIS first and see if it fixes the problem :).
                            It's hard for me to tell if you're using session or not...
                            When you use "context.Respon se.Write(this.d ocument);" I'm not sure where you're retrieving your document from or what "this" is.

                            If you have more problems with this in the future, and you are changing your asp (or C#) code, feel free to ask for help in the Asp.NET forum. If you're having server problems and need assistance configuring or debugging your IIS feel free asking questions in the IIS forum.

                            -Frinny

                            Comment

                            • 200dogz
                              New Member
                              • Oct 2008
                              • 52

                              #15
                              Originally posted by Frinavale
                              It's hard for me to tell if you're using session or not...
                              When you use "context.Respon se.Write(this.d ocument);" I'm not sure where you're retrieving your document from or what "this" is.
                              it's just a string variable =P


                              Originally posted by Frinavale
                              If you have more problems with this in the future, and you are changing your asp (or C#) code, feel free to ask for help in the Asp.NET forum. If you're having server problems and need assistance configuring or debugging your IIS feel free asking questions in the IIS forum.

                              -Frinny
                              cool, thanks

                              Comment

                              Working...