Board index » delphi » Internal Server Error 500

Internal Server Error 500

Hi all,

I have made an application that builds about 100 diferent statistical graphs
and response 12 of them in a page. To do this I build the 12 TDBCharts
according to client needs, change and save as Jpeg, build a page
(TPageProducer) and response it.  It runs.

The problem is that when I refresh the browser window (I am using an
especific browser based on Microsoft Internet Controls), the server returns
the following error message:

INTERNAL SERVER ERROR 500
Exception: EDBEngine Error
Message: Name not unique in this context

Then the whole application stops to work, getting always that same message.
I restart the computer, and everything return to work fine.

Does anybody know what is happening? Where is probably the bug?

 

Re:Internal Server Error 500


What is the Database you are using, what are the Database controls you are using
and also put youre
response part in a try except block to get exception message e.g.

try
Response.Content := PageProducer1;
except
       on E: Exception do
          begin
           Response.Content  := '<html><body>'+E.Message+'</Body></html>';
           Result := ExceptionThatOccured;
          end;
end;//End of try except
handled := true;

"MSc. Eng. Gustavo Nucci Franco" wrote:

Quote
> Hi all,

> I have made an application that builds about 100 diferent statistical graphs
> and response 12 of them in a page. To do this I build the 12 TDBCharts
> according to client needs, change and save as Jpeg, build a page
> (TPageProducer) and response it.  It runs.

> The problem is that when I refresh the browser window (I am using an
> especific browser based on Microsoft Internet Controls), the server returns
> the following error message:

> INTERNAL SERVER ERROR 500
> Exception: EDBEngine Error
> Message: Name not unique in this context

> Then the whole application stops to work, getting always that same message.
> I restart the computer, and everything return to work fine.

> Does anybody know what is happening? Where is probably the bug?

Re:Internal Server Error 500


Quote
>The problem is that when I refresh the browser window (I am using an
>especific browser based on Microsoft Internet Controls), the server returns
>the following error message:

>INTERNAL SERVER ERROR 500
>Exception: EDBEngine Error
>Message: Name not unique in this context

You should use a TSession component with AutoSessionName set to True for
multithreaded applications (which is what ISAPI applications are).

Quote
>Then the whole application stops to work, getting always that same message.

Makes sense, because there is still a session in the cached thread with that
same database name.

Quote
>I restart the computer, and everything return to work fine.

Because the thread releases everything, and the next time, the database name
will be new in its session.

May the code be with you.

Marcelo Lopez Ruiz

Re:Internal Server Error 500


Is this thing CGI, or an ISAPI DLL.

It seems like your DLL isn't unloading between hits.

Quote
Arjang wrote:
> What is the Database you are using, what are the Database controls you are using
> and also put youre
> response part in a try except block to get exception message e.g.

> try
> Response.Content := PageProducer1;
> except
>        on E: Exception do
>           begin
>            Response.Content  := '<html><body>'+E.Message+'</Body></html>';
>            Result := ExceptionThatOccured;
>           end;
> end;//End of try except
> handled := true;

> "MSc. Eng. Gustavo Nucci Franco" wrote:

> > Hi all,

> > I have made an application that builds about 100 diferent statistical graphs
> > and response 12 of them in a page. To do this I build the 12 TDBCharts
> > according to client needs, change and save as Jpeg, build a page
> > (TPageProducer) and response it.  It runs.

> > The problem is that when I refresh the browser window (I am using an
> > especific browser based on Microsoft Internet Controls), the server returns
> > the following error message:

> > INTERNAL SERVER ERROR 500
> > Exception: EDBEngine Error
> > Message: Name not unique in this context

> > Then the whole application stops to work, getting always that same message.
> > I restart the computer, and everything return to work fine.

> > Does anybody know what is happening? Where is probably the bug?

--
Bryan Valencia
Software Services
http://www.209software.com
mailto:br...@209software.com

- "the gravest lie about Y2K matters, is that your company can,
through the acquisition of affidavits of compliance, protect
itself against harm, whether real or litigated. It can't.

This faith in legal documents is hollow and in fact dangerous.
The wisest course of action is for you to immediately disabuse
yourself of this deceit."

- from http://language.perl.com/news/y2k.html

Re:Internal Server Error 500


Dll's DO NOT UNLOAD between hits, this is why dlls are used instead of CGI
scripts. What could be happening is that your application is freeing up a
resource or object after the first hit and falls over on the second as the
resource is unavailable. I have never used a TDBChart but maybe you need to
close the DB connection after you have sent the response. Creating objects
dynamically on every hit would be the safest thing to do as you are probably
in a multi-threaded environment, And on every hit you can be sure you are
working with a "fresh" object that has not been used. Remember to free it
though.

Paul

Quote
Bryan Valencia <br...@209software.com> wrote in message

news:379CF7D3.137211F9@209software.com...
Quote
> Is this thing CGI, or an ISAPI DLL.

> It seems like your DLL isn't unloading between hits.

> Arjang wrote:

> > What is the Database you are using, what are the Database controls you
are using
> > and also put youre
> > response part in a try except block to get exception message e.g.

> > try
> > Response.Content := PageProducer1;
> > except
> >        on E: Exception do
> >           begin
> >            Response.Content  :=

'<html><body>'+E.Message+'</Body></html>';

- Show quoted text -

Quote
> >            Result := ExceptionThatOccured;
> >           end;
> > end;//End of try except
> > handled := true;

> > "MSc. Eng. Gustavo Nucci Franco" wrote:

> > > Hi all,

> > > I have made an application that builds about 100 diferent statistical
graphs
> > > and response 12 of them in a page. To do this I build the 12 TDBCharts
> > > according to client needs, change and save as Jpeg, build a page
> > > (TPageProducer) and response it.  It runs.

> > > The problem is that when I refresh the browser window (I am using an
> > > especific browser based on Microsoft Internet Controls), the server
returns
> > > the following error message:

> > > INTERNAL SERVER ERROR 500
> > > Exception: EDBEngine Error
> > > Message: Name not unique in this context

> > > Then the whole application stops to work, getting always that same
message.
> > > I restart the computer, and everything return to work fine.

> > > Does anybody know what is happening? Where is probably the bug?

> --
> Bryan Valencia
> Software Services
> http://www.209software.com
> mailto:br...@209software.com

> - "the gravest lie about Y2K matters, is that your company can,
> through the acquisition of affidavits of compliance, protect
> itself against harm, whether real or litigated. It can't.

> This faith in legal documents is hollow and in fact dangerous.
> The wisest course of action is for you to immediately disabuse
> yourself of this deceit."

> - from http://language.perl.com/news/y2k.html

Re:Internal Server Error 500


Hi all,

Thanks for your interest and help. I have already solved the problem. It's
really a resource problem that can be solved with the right threads
threatment. I forgot to use a TSession and to enable the HandleShared
property of TDatabase.

Thanks again,

MSc Eng. Gustavo Nucci Franco
DEF - FEM - UNICAMP
nfra...@correionet.com.br

Paul Gertzen escreveu na mensagem <7njmk8$44...@forums.borland.com>...

Quote
>Dll's DO NOT UNLOAD between hits, this is why dlls are used instead of CGI
>scripts. What could be happening is that your application is freeing up a
>resource or object after the first hit and falls over on the second as the
>resource is unavailable. I have never used a TDBChart but maybe you need to
>close the DB connection after you have sent the response. Creating objects
>dynamically on every hit would be the safest thing to do as you are
probably
>in a multi-threaded environment, And on every hit you can be sure you are
>working with a "fresh" object that has not been used. Remember to free it
>though.

>Paul

>Bryan Valencia <br...@209software.com> wrote in message
>news:379CF7D3.137211F9@209software.com...
>> Is this thing CGI, or an ISAPI DLL.

>> It seems like your DLL isn't unloading between hits.

>> Arjang wrote:

>> > What is the Database you are using, what are the Database controls you
>are using
>> > and also put youre
>> > response part in a try except block to get exception message e.g.

>> > try
>> > Response.Content := PageProducer1;
>> > except
>> >        on E: Exception do
>> >           begin
>> >            Response.Content  :=
>'<html><body>'+E.Message+'</Body></html>';
>> >            Result := ExceptionThatOccured;
>> >           end;
>> > end;//End of try except
>> > handled := true;

>> > "MSc. Eng. Gustavo Nucci Franco" wrote:

>> > > Hi all,

>> > > I have made an application that builds about 100 diferent statistical
>graphs
>> > > and response 12 of them in a page. To do this I build the 12
TDBCharts
>> > > according to client needs, change and save as Jpeg, build a page
>> > > (TPageProducer) and response it.  It runs.

>> > > The problem is that when I refresh the browser window (I am using an
>> > > especific browser based on Microsoft Internet Controls), the server
>returns
>> > > the following error message:

>> > > INTERNAL SERVER ERROR 500
>> > > Exception: EDBEngine Error
>> > > Message: Name not unique in this context

>> > > Then the whole application stops to work, getting always that same
>message.
>> > > I restart the computer, and everything return to work fine.

>> > > Does anybody know what is happening? Where is probably the bug?

>> --
>> Bryan Valencia
>> Software Services
>> http://www.209software.com
>> mailto:br...@209software.com

>> - "the gravest lie about Y2K matters, is that your company can,
>> through the acquisition of affidavits of compliance, protect
>> itself against harm, whether real or litigated. It can't.

>> This faith in legal documents is hollow and in fact dangerous.
>> The wisest course of action is for you to immediately disabuse
>> yourself of this deceit."

>> - from http://language.perl.com/news/y2k.html

Other Threads