Subject Re: [IBO] IBO Stored procedure under high load
Author Helen Borrie
At 10:31 AM 18-09-02 +0000, you wrote:
>Hi,
>
>I'm using IBO on an Asta3 Server, and when doing performance testing
>tonight, I came accross the following problem : An AstaClient
>application
>executes an Asta Servermethod, which , within it's own thread has to
>execute an IBO stored procedure. The Asta Servermethod has the same
>parameters as the IBO SP, so in the Action procedure of the method I
>do the
>following :
>
>procedure TIBDataModule.AstaBusinessObjectManager1Actions0Action(
> Sender: TObject; ADataSet: TDataSet; ClientParams: TAstaParamList);
>var
>i:Integer;
>begin
> lastBOActionDate := now;
> ibSPPROCESSDAYBID.prepare;
> for i:=0 to ClientParams.Count-1 do
> begin
> if ibSPPROCESSDAYBID.Parambyname(ClientParams[i].Name) <> nil
>then <-
>Error happened here
> begin
> ibSPPROCESSDAYBID.ParamByName(ClientParams[i].Name).value :=
>ClientParams[i].value;
> end;
> end;
> ibSPPROCESSDAYBID.execproc;
>..
>
>normally this runs fine, but occasionally (when I try to put pressure
>on the
>server) I receive an error saying ibSPPROCESSDAYBID parameter BuyID
>doesn't
>exist, although it does exist and has been executing for
>about a 1000 times <g>

Is this the actual logic of your handler? If so, then you seem to be
calling execproc in both success and fail conditions.


>I changed the parambyname in the marked line to findparam, but now I'm
>getting an occasional List index out of bounds error sometimes on
>listindex
>1, sometimes on 2 or 3
>
>How can it be that suddenly the params get lost ?
>
>Is the prepare ok , or should I call unprepare before that ? Why only
>failing every x times or so ?

What version of client and server are you using? If it isn't Firebird 1,
then you might be encountering some manifestation of the famous XSQLDA
bug. For more info, see the article on the IBO news page - it applies to
all versions of InterBase and some of the Firebird
betas. http://www.ibobjects.com/iboNews.html

But I'd take a close look at the logic of your handler procedure before
jumping to conclusions...

Helen