473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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

52
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
Feb 10 '09 #1
18 1908
sicarie
4,677 Expert Mod 4TB
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?
Feb 10 '09 #2
200dogz
52
@sicarie
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.
Feb 10 '09 #3
sicarie
4,677 Expert Mod 4TB
Have you attempted to run the code on a test box and ensure this report is created properly with the code you have?
Feb 11 '09 #4
200dogz
52
@sicarie
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.
Feb 11 '09 #5
sicarie
4,677 Expert Mod 4TB
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.
Feb 12 '09 #6
200dogz
52
@sicarie
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.
Feb 12 '09 #7
sicarie
4,677 Expert Mod 4TB
@200dogz
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.
Feb 12 '09 #8
NeoPa
32,556 Expert Mod 16PB
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.
Feb 12 '09 #9
Frinavale
9,735 Expert Mod 8TB
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.
Feb 12 '09 #10
200dogz
52
@Frinavale
Hey Frinavale I think you are probably right!

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

Expand|Select|Wrap|Line Numbers
  1. HttpContext context = HttpContext.Current;
  2. context.Response.Clear();
  3. context.Response.AppendHeader("Content-Type", "application/msword");
  4. context.Response.AppendHeader("Content-disposition", "attachment; filename=\"report.doc\"");
  5. context.Response.Write(this.document);
  6. context.Response.BufferOutput = true;
  7. context.Response.Flush();
  8. 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 :).
Feb 13 '09 #11
200dogz
52
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
Feb 18 '09 #12
NeoPa
32,556 Expert Mod 16PB
... 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.
Feb 18 '09 #13
Frinavale
9,735 Expert Mod 8TB
@200dogz
It's hard for me to tell if you're using session or not...
When you use "context.Response.Write(this.document);" 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
Feb 18 '09 #14
200dogz
52
@Frinavale
it's just a string variable =P


@Frinavale
cool, thanks
Feb 18 '09 #15
NeoPa
32,556 Expert Mod 16PB
@200dogz
This may sound stupid from a non-asp person, but is it possible for a simple string variable to work as an object? Put another way - Can a string variable have a document property?
Feb 18 '09 #16
200dogz
52
@NeoPa
Yes that's what I've been using for all my reports. As long as the headers are set correctly you can write any string as output.
Feb 18 '09 #17
NeoPa
32,556 Expert Mod 16PB
Cool. That confirms it is simply down to my not understanding ASP.

-NeoPa <creeping quietly away - hoping nobody notices>
Feb 18 '09 #18
Frinavale
9,735 Expert Mod 8TB
Um....?
The String object doesn't have a "document" property.......
"document" is the name of your String variable right?

I think you meant to say that "this" refers to the page, and "document" is the name of a variable within the page.
Feb 18 '09 #19

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: John E. Hadstate | last post by:
Please forgive the heavy cross-posting and feel free to delete inappropriate groups when you reply. I am really at a loss and hope someone has an answer for my problems. Environment: Redhat...
10
by: Fred | last post by:
There is a setting in INIT.ORA that has the unintended side-effect of making sure the ALTER SYSTEM KILL SESSION command has immediate affect. Without this setting, I've seen some instances where...
2
by: Ajay Todimala | last post by:
Hi Folks, I am running a C++ simulation on Redhat Linux 9. It is computational and memory intensive. After running for some time it gets killed. It does not give any core dump. The following...
12
by: Jose Fernandez | last post by:
Hello. I'm building a web service and I get this error. NEWS.News.CoverNews(string)': not all code paths return a value This is the WebMethod public SqlDataReader CoverNews(string Sport)...
8
by: utagger | last post by:
Hi All, We have a gallery component that allows us to upload images. An Edit Image Entry user control allows the user to update an image, by replacing the current one. Oddly, after replacing...
5
by: Steve Crawford | last post by:
This morning I got bitten by the "SELECT INTO" / "CREATE TABLE AS" from tables without OIDs bug in 7.4.1. Postmaster killed all the backends and restarted - pg was down for 2 seconds. This...
4
by: Alessandro | last post by:
Hi everybody, I tried to find some information about my subject with google, but I didn't find anything. I need to read a text file, process the entire content, then kill. In the meantime I...
42
by: Doug | last post by:
I am in a friendly debate with some co-workers... and my boss. We use Access 2003 for the frontend (on workstations) as well as for the backend (on a Dell PowerEdge running Windows 2000 server,...
7
by: dieter | last post by:
Hi, Overview ======= I'm doing some simple file manipulation work and the process gets "Killed" everytime I run it. No traceback, no segfault... just the word "Killed" in the bash shell and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.