Subject | Re: Still threading problems |
---|---|
Author | buppcpp |
Post date | 2005-05-12T10:16:36Z |
The problem might be with your use of <localhost>.
I read somewhere that this creates a share memory setup that is not
threadsafe.
Try using <hostname>:<database> instead.
--- In firebird-support@yahoogroups.com, "Christian Kaufmann"
<ch.kaufmann@s...> wrote:
I read somewhere that this creates a share memory setup that is not
threadsafe.
Try using <hostname>:<database> instead.
--- In firebird-support@yahoogroups.com, "Christian Kaufmann"
<ch.kaufmann@s...> wrote:
> Hi,with
>
> I still have problems with threads. I built a service application
> Indy TIdHttpServer. It works fine, if there are only some requestsor
> if I run it on my laptop.just
>
> But if I put it on our server (with Hyper Threading) and I simulate
> some load with Ctrl-R in the browser, at some the application is
> killed, sometimes with exceptions (always in unit SqlExpr), most ofwhat
> the time with no feedback.
>
> I reduced the code in the request to a minimum and I don't see,
> goes wrong:('STYLEID').AsInteger]);
>
>
> procedure TWebGetTestDB.TestWithDbx;
> var
> conn : TSQLConnection;
> qry : TSQLDataSet;
> s : String;
> begin
> conn := TSQLConnection.Create(nil);
>
> conn.LoginPrompt := False;
> conn.SQLHourGlass := False;
> conn.LoadParamsOnConnect := False;
> conn.ConnectionName := 'DATABASE';
> conn.DriverName := 'DBX_DRIVER';
> conn.LoginPrompt := False;
> conn.Params.Values['Database'] := 'localhost:\D:\mydb.fdb';
> conn.Params.Values['User_Name'] := 'SYSDBA';
> conn.Params.Values['Password'] := 'masterkey';
> conn.GetDriverFunc := 'getSQLDriverFB';
> conn.LibraryName := 'dbxup_fb.dll';
> conn.VendorLib := 'fbclient.dll';
> conn.Params.Values['DBX TransIsolation'] := 'ReadCommited';
> conn.Params.Values['ServerCharSet'] := 'ISO8859_1';
> conn.Open;
>
> qry := TSQLDataSet.Create(nil);
> qry.SQLConnection := conn;
> qry.CommandText := 'select * from STYLE';
> qry.Prepared := True;
> qry.NoMetaData := True;
>
> qry.Open;
> qry.First;
> s := 'Data: ';
> while not qry.Eof do begin
> s := Format('%s - %d', [s, qry.FieldByName
> qry.Next;it's
> end; // while
> FResponse.ContentType := 'text/html';
> FResponse.ContentText := s;
>
> qry.Free;
> conn.Free;
>
> end;
>
>
> Did I miss something here? If the application can catch an error,
> in the open method of the connection or in the open method of themethod,
> dataset. But it happens random. And if I Synchronize the test
> there is never a problem.
>
> cu Christian