 |
|
 |
When posting your question please:- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode HTML tags when pasting" checkbox before pasting anything inside the PRE block, and make sure "Ignore HTML tags in this message" check box is unchecked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-fou
|
|
|
|
 |
|
|
 |
|
 |
Has it really been that long?!?!?!?! It also means that now I am an old fart... considering I was coding in TP7 then D1, D3, D5, D7, D2006 (is anyone noticing a pattern here? )... *buys a walking stick*
btw... smags... I am very close to finishing my next article... It's taking me longer to write considering I have a deadline type thing going at the moment with work, but I hope you (and the rest of the community) will like it when I post it... Tis got to do with the fun-ish side of Delphi development...
Cheers,
Glen Vlotman
"You cannot code for stupidity"
|
|
|
|
 |
|
 |
I have an ISAPI application with a TWebModule running on IIS6. There's try/except and fine exception logging around every method. Every single request and it's response status are also being logged. About five times a week this happens: 1) TWebModule.OnException is called with "EInOutError: File not found". Mostly the error is logged by just one thread, sometimes by up to four threads at once. (The cause must be outside my code, because there are no lines outside try/except blocks.) 2) For a few minutes IIS answers thousands of request with status 500, though they are not logged by the ISAPI DLL. That means, the requests don't cause more exceptions in the TWebModule instances, they seem to just bounce off my IIS. 3) Finally there's a message in the event log that one worker process did not recycle in time. 4) For a day or two, everything runs fine again. I guess the TWebModule instance is in some kind of blocked state, but IIS still tries to feed it with requests. So, I want to stop the thread in TWebModule.OnException. Is there a way to shutdown a single TWebModule, that means one IIS thread or worker process, without recycling the whole Application Pool? Thanks a lot, Corinna
|
|
|
|
 |
|
 |
Hi, Corinna,
I don't have experience with Delphi on server side, so the following response might be useless to your case.
The description makes me still wondering if the threads were crashed by unhandled exception from inside your codes. Just want to make sure there is no such code as XYZ.Create() left outside the try/except or try/finally blocks, as some Delphi components throw exceptions during construction.
|
|
|
|
 |
|
 |
Thanks for your reply! There are some .Create() lines in the main unit, before the TWebModule is created. But if they would crash, the web module's handler woudln't catch them, because, well, it doesn't exist, yet. The DLL uses the library "Graphics32". I don't think it starts any threads on its own, but it creates many objects. It is only called inside try/except block, of course. It also uses some Named Pipes to talk to a Windows service running on the same machine. But the crashes occur mostly during request that do not touch those pipes, so they cannot be the cause. Anyway, the ISAPI application answers between 2 and 4 million requests per day. The EInOutException happens only once or twice a day. When I repeat the failed request later on, it works fine again. That makes it quite tricky to find out what exactly happens.
|
|
|
|
 |
|
 |
Hi Corinna,
As you suggest, it definitely sounds to me like there is some kind of resource and/or thread blocking happening, and those are not exactly the nicest to try figure out.
Although your code/threads may not be responsible/guilty of the blocking, it is unfortunately something that can become a much bigger problem later on Are you executing any other (custom or not) threads as well?
Cheers,
Glen Vlotman
"You cannot code for stupidity"
|
|
|
|
 |
|
 |
The reason why I am asking if you are using your own threads is you can send a message to all your threads to terminate when you get that exception from TWebModule. Just so you know the module will stop. If you need any pointers on how you would need to do that, let me know.
Cheers,
Glen Vlotman
"You cannot code for stupidity"
|
|
|
|
 |
|
 |
Have you managed to figure out where the issue was Corinna?
Cheers,
Glen Vlotman
"You cannot code for stupidity"
|
|
|
|
 |
|
|
 |
|
 |
Glad to hear that your problem has been resolved.
You can 'force' a thread to terminate using a few techniques. One which I found that works quite well is enabling your thread to listen for a custom message. Once it receives that message the thread can then call the terminate process (and perform whatever cleanups it needs of course).
Hope that helps
Cheers,
Glen Vlotman
"You cannot code for stupidity"
|
|
|
|
 |
|
 |
Hi again Delphi-freak type people like me ...
I would like to propose that we make a concerted effort to get some more Delphi articles posted here.
I am busy working on some (simple) gaming articles for Delphi and even more in-depth "hardcore" type Delphi articles that I want to post here.
I wanna keep the Delphi/Pascal flag flying as high as I can possibly get it to be. Hopefully we might even get a dedicated section for us, complete with a pascal parser for the site itsself!!!
Is anyone else with me on this endeavor?
Cheers,
Glen Vlotman
"You cannot code for stupidity"
|
|
|
|
 |
|
 |
Hey, nortee,
good to see you again. that sounds interesting. I'd love see your in-depth Delphi articles, and the articles would help, as I'm struggling between C++ and Delphi. (I'm being... preparing... to get ready to... write something though )
|
|
|
|
 |
|
 |
Hi smag13,
Have a look at Patching me and patching you. I am going to be revamping my wording for the article (because I was a bit trashed when I wrote it). But I am going to be doing a lot more articles.
Cheers,
Glen Vlotman
"You cannot code for stupidity"
|
|
|
|
 |
|
 |
100% with you
|
|
|
|
 |
|
 |
^5 Jose...
I will show you mine if you show me yours... :P
Cheers,
Glen Vlotman
"You cannot code for stupidity"
|
|
|
|
 |
|
 |
I posted 2 articles on Delphi in October 2011. I wonder if these are still the latest ones
|
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Hi
Can any one please help me on this issue?
i am trying to transfering a file TSclint to local machine in Windows 7 32bit OS, for that i am using WtsApi32.pas ,but the same thing is not happining in Windows 7 64bit OS
|
|
|
|
 |
|
 |
Hi,
What error message do you get while "the same thing is not happening"?
Some people has problem using the channel between 32bit and 64bit. Can you paste your codes?
|
|
|
|
 |
|
 |
Hi,
I'd just like to ask: Are there still people on here that dabble and/or work with Delphi? I'm just asking because I am in the process of posting several articles and tips and tricks regarding Delphi and I'd just want to know that my efforts to help people would not be in vain.
I will still post the articles, don't get me wrong, I'd just prefer that the articles and stuff would be useful to the rest of the community.
Cheers,
Glen Vlotman
"You cannot code for stupidity"
|
|
|
|
 |
|
 |
Hi, nortee,
Yes, there are
I use Delphi mainly for desktop UI on Windows, though. I would love to see articles talking about Delphi techniques, and I'm sure I will definitely thumb up your articles.
|
|
|
|
 |
|
|
 |
|
 |
Hi Glen,
There are no much such Delphi fans here.
You can make some speculation from my Delphi article statistics.
But I will be very glad to see your articles about Delphi .
Good Luck
|
|
|
|
 |