Jump to content

Wilton Ergon

uniGUI Subscriber
  • Posts

    626
  • Joined

  • Last visited

  • Days Won

    21

Posts posted by Wilton Ergon

  1. if the backup routine is automatic without user intervention that will run at a scheduled time, use a tunitreadtimer, on the servermodule.

    create a specific connection for this backup routine.

    I don't think it's a good idea to have a routine like this for your end user to run, it can generate I/O overhead on your server.

    • Like 1
  2. if you are compiling your application in 32bits, set to true this option.
    with hyperserver, farshard itself, recommends using 32-bit

    image.thumb.png.ac4efaf3d894c8b465d9cbe43f259f75.png

    Compare with your settings, use the translator for your language!

    image.thumb.png.e84b1178ff36b0a277693ce5928cbff8.png

     

     

  3. I'm thinking about activating a sdac feature, which allows working with the disconnected database, that way it keeps open queries in cache, and closes the connection with the database, similar to what would happen if I used a rest api. this can help reduce the number of simultaneous connections to the database server, but for that I need to make some adjustments to the application, as this feature does not work using temporary tables created in sql server. but this is still far from reaching the limit of sql server connections that supports up to 32 thousand active connections...

  4. 19 minutes ago, Farshad Mohajeri said:

    Mais perguntas:

    1) Você tem um temporizador contínuo em seu aplicativo? Se sim, qual é o intervalo?

    2) Você tem um único servidor de banco de dados para todas as sessões?

    no continuous timer.

    yes, only 1 server.

    on login, I identify the database, and direct the customer to its respective database.

    today my server has about 130 banks. with 120gb ram disk ssd, which has from 1gb to 18gb

    dedicated server with 2 processors, sql server standart 2019 limited a 80gb memory
    I frequently monitor the health of the databases, and my database server never uses 100% cpu or memory, I don't have time-consuming queries, I'm very careful about this

     

    I use timers, but in no form it is activated continuously, I always turn it off as soon as it runs.
    I always use it with these print settings, changing only the range property

    image.png.130d6505bad7ab7e0e791651a5b4e642.png

     

    I haven't noticed any problem with the bank server being slow yet, when the problem occurred yesterday with users not being able to maintain the connection, the bank server had about 10% cpu usage, and with low disk usage as well.

    it would be very good for you to clarify for everyone, how the hyperserver works behind the scenes, when a user connects to the master server and is redirected to a slave server, from that moment on, all requests will always go through the master? the exchange of this information?, if it is necessary to put 20 slave machines, will the master server manage the entire computer park? how far does it work?

     

     

     

     

     

  5. my infra

    serv bd 20 cores with 40 logical processors 128 ram ssd with 120 databases sql server 2019.  lan adapter 1 GB full

    5 servers for  app, with 32 ram 8 cores  disk ssd

    connections usinng sdac

    unigui 1.9.552

     

    Everything was going well in the range of 1400 users, this end of the year we had a peak of users reaching 2700. With that started loss of connections, slow access, even with all servers with low cpu, disk, memory usage, I use just one site, where all users connect using the same address

    it seems to me that the hyperserver is still not well-optimized to receive a large load of users, even if you have an excellent infrastructure.

    I also use the bank server as an application server, but with only 5 nodes, and on the other servers there are 30 nodes.

    the hyperserver infrastructure has to be reviewed with great criteria and care, because from what I understand, reaching a very large number of users, eg 10k, does not depend only on the physical part

     

    image.png.aad2404dfcef986529915d79c1369976.png

    as can be seen, I had no peaks in cpu usage that reached 100%

    image.png.389ae4207e63be36e0874715bac39d9e.png

     

    image.png.31f2bbd84be7b3a05769d78c816e7687.png

     

     

     

     

     

    • Like 1
  6. friend, because you don't use the native unigui load balancing, I used nginx, and I had a lot of problems in the user reconnection when one of the servers stopped, it takes a long time to identify that the server was no longer available.

    • Happy 1
  7. unigui's hyperserver feature already balances the servers evenly,

    as far as I know it is not possible for you to indicate which server a user will be forwarded to, each time a user connects, he may be directed to a different server, (whichever has fewer users) he will keep that user in this vm, until he disconnect.

    if a server stops, the user will be disconnected, and will automatically be redirected to another server (a new login must be done by the user)

    I used nginx to do load balancing, until the new hyperserver feature was released,

    today I'm using hyperserver and I'm very satisfied with the result, for me it's working much better than nginx

     

    yes you can with the same hyper server installation add several applications
    access will be via url
    www.yourcompany.com.br/app1

    www.yourcompany.com.br/app2

    this is done in the configuration cfg file, I haven't used this feature yet, but it's pretty simple to do.


    as far as i know, i seem to be the first unigui user worldwide to deploy the hyperserver solution with multiple servers. I hope more companies use this feature, so we can exchange experiences on the subject

    • Happy 3
  8. there is no way to create such a test case, as already explained, the function is called thousands of times a day, and randomly in some cases, this message is displayed, in totally different forms, when ending the session and trying the form again already and opened without problems, if I knew what causes this error to occur, I could try to find something else in the system that could generate the error.

    • Upvote 1
  9. I think the delay is actually, in unigui loading your user section, as you said the delay and only when you start the standalone server for the first time, in a production environment, your standalone server will be running all the time, the it's not clear when you need to update your system so I don't think this should be taken into account.

  10. I would work with a summarized data model in the first search, and for each record, the user could expand the data, like a drwdown.

    ex: you do the first search by grouping the most important information, this will reduce the number of lines by millions..

    from this first select with a group by, your user will select the desired information in the grid, a double click is performed, and from there it will open a new query, based on the selected record, in this way you can make a chain of queries, until your user finds the pertinent information.

    ex:
    I have a sales table with 30 million records.

    the first search returns me sales totals by region.

    when selecting the region, it returns me more sales details, only for the region.
    and every open grid, I apply a new filter. until you reach the last level of registration.

    Of course you don't need your tool to display 8 million rows in a grid, this is totally useless for any user.
    but you can get the desired information by helping your user through the filtering steps.

     

    you say in your text
    "
    a manager is looking for some kind of anomaly that affects hundreds of thousands of installations
    "

    It would be good if your application understands what an anomaly can be, and only display the pertinent data, rather than letting your user search for it.

    if the manager identifies such a record as wrong, and because there is a rule for him to reach that conclusion, then put that rule into the system, and help his user find the record that really matters.

     

  11. in some cases, this error is generated when creating a frame inside a pagecontrol,
    I've never been able to get this error locally in development, but it always appears in my error log that I capture in the application, I can't understand why this happens in a completely random way.

    I'm using this event to catch the error, and a function created by farshad to catch the error and save it to a table.

     

    procedure TUniServerModule.UniGUIServerModuleException( Sender: TUniGUIMainModule; AException: Exception; var Handled: Boolean);
    var
      s, Msg: String;
      p1, p2, p3: Integer;
    begin
      try
        if Assigned(Sender) then
         begin
          try
            (sender as TUniMainModule).LogException(AException);
          except
            s:= 'debug';
          end;
          Handled:= True;
        end
       else
        begin
          if AException <> nil then
          begin
            Msg:= AException.Message;
            p1 := Pos('Invalid URI:', Msg);
            p2 := Pos('EIdOSSLAcceptError :', Msg);
            p3 := Pos('Session not found:', Msg); // EUniSessionException : Invalid session or session Timeout. (Session not found:
            if (p1+p2+p3) > 0 then
            begin
              Handled:= True;
            end
           else
            begin
              Logger.AddLog('ERROR_GEP_WEB',
                            'EXCEPTION - ' +
                            'UnAssigned MainModule "'+Msg+'"');
              Handled:= True;
            end;
          end
         else
          begin
               Handled:= True;
          end;
        end;
      except
      end;
    end;

    in mainmodule...

    procedure Tunimainmodule.LogException(E: Exception);
    var
      Cmp: TComponent;
      s1, s2, Msg: String;
    begin
      S1:='';
      S2:='';
      try
        if E <> nil then
        begin
          Msg:= E.Message;
          if copy(msg,1,1)<>'*' then
            Begin
              Cmp:= TUniGUIApplication(UniApplication).UniSession.CurrentComponent;
              if Assigned(Cmp) then
               begin
                if Cmp is TUniControl then
                     s2:= TUniControl(Cmp).OwnerForm.Name
                else if Cmp is TUniComponent then
                     s2:= TUniComponent(Cmp).OwnerForm.Name
                else s2:= '';

              //this function save in database error!
                SaveLogError(Msg,                      s2+' - '+cmp.Name+' - ' +Cmp.ClassName,                        CaptionGuiaAtualPrincipal);
               end
             else
               begin
                    SaveLogError(Msg,
                                'ERRO NAO IDENTIFICADO',CaptionGuiaAtualPrincipal);
               end;
            End;

      except
      end;
    end;

    my function create new form...

     

    procedure TFrmPrincipal.CriaFormulario(NomeForm,Titulo:string;BotaoFechar:Boolean);

    Var  Ts  : TUniTabSheet;
         FrC : TUniFrameClass;
         Fr  : TUniFrame;
         i   : Integer;
         fname,TsName:String;
    Begin
      Try
        For I := 0 to pgControlMain.PageCount-1 do
          Begin
            if pgControlMain.Pages[I].Caption=Titulo then
              Begin
                pgControlMain.ActivePageIndex :=I;
                Exit;
              End;
          End;

       if pgControlMain.PageCount>5 then
          FecharAba(1);

        TsName:='tab_'+SomenteLetras_e_Numeros(GetGuid);
        fname :=NomeForm+SomenteLetras_e_Numeros(GetGuid);


        Ts             := TUniTabSheet.Create(self);
        Ts.PageControl := pgControlMain;
        Ts.Name        := TsName;
        Ts.Closable    := BotaoFechar;

        Ts.Caption     := Titulo;
        Ts.OnClose     := tabStartClose;
        pgControlMain.ActivePage   :=Ts;
        FrC             := TUniFrameClass(FindClass(NomeForm));

        Fr                := FrC.Create(self); //here before I used TS as form owner
        Fr.Name      := fname;
        Fr.Align       := alClient;
        Fr.Parent     := Ts;


      finally
        BEGIN
         HideMask;
         UniSession.Synchronize;
        END;
      end;
    end;

     

    procedure TFrmPrincipal.tabStartClose(Sender: TObject; var AllowClose: Boolean);
    var   zForm: TuniFrame;
    begin

    //destroy frame 
      try
          zForm        := tunitabsheet(sender).controls[0] as TuniFrame;
          freeandnil(zform);
      except
      end;

    end;

     

     

     

     

     

  12. o problema foi resolvido, nos servidores de aplicativos, necessários para instalar a biblioteca de acesso ao sql server 2019, MSOLEDB, em versões anteriores do servidor SQL, cliente nativo usado, cliente nativo não e totalmente compatível com sql 2019, gerando problemas na busca em campos de varchar (max), isso me fez relacionar com a versão do sencha, pois foi na mesma data que eu fiz a troca também sql servidor

  13. I'm having trouble creating dynamic menus running on the hyperserver, when application runs as standalone, no problem occurs, someone is going through it, this also only occurs when the menu is created in a frame, and pointed to a tunimenubutton, when the menu is created on a form, not the problem.

     

    I will try to create an example for support simulate this, the problem started after I put to run on hyperserver, I continue using the version 1552

    i noticed several errors in the browser console, this does not occur in stand alone mode (in host location)

    my code function in mainmodule!

    PROCEDURE TUniMainModule.MontaArvoreLocalizacao(Menu:TuniMenuItem;somenteAtivos:boolean;selectreport:string);
    var MenuRelatorio:TUniMenuItem;
        qPastas:TMSQuery;
    BEGIN

     

      try
        qPastas            :=TMSQuery.Create(UniApplication);
        qPastas.Connection :=UniMainModule.dbsmain;
        qPastas.close;
        qPastas.SQL.Text :=selectreport;
        qPastas.Open;

        MenuRelatorio         :=TuniMenuItem.Create(UniApplication);
        MenuRelatorio.Caption :='-';
        UniMainModule.Global_ContadorMenu :=UniMainModule.Global_ContadorMenu+1;
        MenuRelatorio.Name    :='MenuItem'+IntToStr(UniMainModule.Global_ContadorMenu);
        UniMainModule.Global_ContadorMenu :=UniMainModule.Global_ContadorMenu+1;
        Menu.Add(MenuRelatorio);
        UniMainModule.Global_ContadorMenu :=UniMainModule.Global_ContadorMenu+1;
        while not qPastas.Eof do
          Begin
            MenuRelatorio         :=TuniMenuItem.Create(self);//UniApplication);
            MenuRelatorio.Caption :=qPastas.FieldByName('modulo').AsString+'| Qtde:'+qPastas.FieldByName('REG').AsString;
            MenuRelatorio.Name    :='MenuItem'+IntToStr(UniMainModule.Global_ContadorMenu);
            UniMainModule.Global_ContadorMenu :=UniMainModule.Global_ContadorMenu+1;
            menurelatorio.Hint    :=IIF(somenteAtivos,'1','0');
            MenuRelatorio.OnClick :=ExecClickRelatorioMenu;
            menurelatorio.Hint    :='MODULO';
            MenuRelatorio.Tag     :=0;
            Menu.Add(MenuRelatorio);
            qPastas.Next;
          End;
      finally
        freeandnil(qpastas);
      end;

    end;

     

     

     

    image.thumb.png.62a42eba4f1b71aafc0bd2e7ce16f801.png

     

     

     

  14. before I had an application installed on iis for each client, and each client had their address

    client1.mysite.com.br
    clientex.mysite.com.br


    today I have only one website

    mysystem.mysite.com.br


    I identify the company and the user and the database by login, this made it much easier to distribute to new customers.

    have a separate base just for the unified registration of users.

    use the unique document number of your country, here in Brazil, I use the cpf.

     

  15. I updated my executable, by master, using the upload new version button

    image.thumb.png.b67c5fc20a58e2c56c984c0d7576839c.png

    it dropped the nodes on the master server, and started loading the new nodes, as it always was.

     

    image.png.1c31e597c7e1ff9f17446ab81cd84193.png

     

    and I connected to the server and realized that the slave servers were still with the old version, so I went back to the panel to connect and also individually upload the version on each server, then it was no longer possible to connect to the slave servers.

    so I did the update manually on each server, and even after restarting the service, it was not compatible.


    to get back up and running.

    I restarted everything, including the main server.

     

     

     

     

     

  16. it started working again after restarting the servers, it had just restarted the hyperserver service...

    anyway, it would be good to review the version update feature, if agent sends a new version to the main server, it should send this version to all slave servers, it seems to me that it doesn't and that's how it happens, when uploading the new version , it dropped the connections but did not update the version on the slave servers.

  17. this happened after I uploaded a new version of my application, I haven't changed the unigui version, I'm still using 1552, already restart all services, now the master server no longer connects to the slave servers

    in the manual, it says nothing about what happens, or what should be done when it has this status

    image.thumb.png.c5f25b341462b20f7e28e527b8ad636a.png

×
×
  • Create New...