Giter Site home page Giter Site logo

Comments (7)

viniciussanchez avatar viniciussanchez commented on September 27, 2024 1

Bom dia.. THorse.MaxConnections := X;
Se não me engano o padrão é 32. Isso é apenas para alguns tipos de aplicações, por exemplo, console, VCL...

from horse.

cachopaweb avatar cachopaweb commented on September 27, 2024

Qual banco de dados vc está usando, Firebird? Me parece uma mensagem deste tipo de banco...

from horse.

aesjunior2707 avatar aesjunior2707 commented on September 27, 2024

Qual banco de dados vc está usando, Firebird? Me parece uma mensagem deste tipo de banco...

Estou usando tanto SQLServer quanto PG

from horse.

cachopaweb avatar cachopaweb commented on September 27, 2024

Pode ser que vc esta usando múltiplas instâncias de conexões, tive esse mesmo problema com bancos firebird, e resolvi fazendo uma lista de conexões e liberando-as após o uso em cada end-point. Ex. classe conexão:

-----
var
  FDriver : TFDPhysFBDriverLink;
  FConnList : TObjectList<TFDConnection>;

function TConnectionFiredac.Connected: Integer;
begin
  if not Assigned(FConnList) then
     FConnList := TObjectList<TFDConnection>.Create;

  FConnList.Add(TFDConnection.Create(nil));
  Result := Pred(FConnList.Count);
  FConnList.Items[Result].Params.DriverID := 'FB';
  FConnList.Items[Result].Params.Database := FCaminhoBD;
  FConnList.Items[Result].Params.UserName := FUsuario;
  FConnList.Items[Result].Params.Password := FSenha;
  FConnList.Items[Result].Params.Add('CharacterSet=utf8');
  FConnList.Items[Result].Connected;
end;

procedure TConnectionFiredac.Disconnected(Index: Integer);
begin
  FConnList.Items[Index].Connected := False;
  FConnList.Items[Index].Free;
end;

end.

from horse.

aesjunior2707 avatar aesjunior2707 commented on September 27, 2024

Acredito que no meu caso não seja esse problema, tentamos solucionar usando da seguinte maneira :

Horse.MaxConnections := High(Integer);**

Porém não obtivemos sucesso, teria uma maneira de pegar o numero de conexões ativas no horse @viniciussanchez ?

from horse.

dliocode avatar dliocode commented on September 27, 2024

@aesjunior2707 Essa mensagem é do limite de conexões REST;
Para resolver, vai utilizar o THorse.MaxConnections := 10000;

Lembrando que existe uma limitação para conexões com o Banco de Dados;
O postgres tem um limite default de 100 conexões;

É recomendado verificar no seu banco de dados esse limite e se possível aumentar esse valor;

from horse.

aesjunior2707 avatar aesjunior2707 commented on September 27, 2024

Obrigado @dliocode !

from horse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.