Bonsai Posted April 16, 2016 Share Posted April 16, 2016 Hey, I was trying to use callRemote to exchange messages between servers, but sometimes there is a HUUUGE delay or the message doesnt reach the other server at all. So, is that something that can be fixed? Is this happening because of some internal MTA stuff? I tried to use the socket module, but for some reason there is no way to listen on a socket, which makes them kinda useless. And the curl module is not available for linux servers. Anyone knows what to do about this? Bonsai Link to comment
MTA Team ccw Posted April 16, 2016 MTA Team Share Posted April 16, 2016 Is callRemote or fetchRemote being used for anything else (in any running resource)? Link to comment
Bonsai Posted April 16, 2016 Author Share Posted April 16, 2016 No, its only used in that one resource. But it might be used several times in a short amout of time, like when u try to send more messages. Link to comment
MTA Team ccw Posted April 16, 2016 MTA Team Share Posted April 16, 2016 What is the ip/port of the two servers? Link to comment
Bonsai Posted April 16, 2016 Author Share Posted April 16, 2016 They both have the same ip, but different ports. Its using the HTTP port from the config file, which in this case is the same as the server port. Link to comment
GTX Posted April 17, 2016 Share Posted April 17, 2016 HTTP port is same as server port? Try using different port (for example 22005 for HTTP and 22003 for server) Link to comment
MTA Team 0xCiBeR Posted April 17, 2016 MTA Team Share Posted April 17, 2016 HTTP port is same as server port? Try using different port (for example 22005 for HTTP and 22003 for server) There is no problem on using the same port for server and HTTP as server runs con UDP protocol and HTTP runs on TCP protocol. Link to comment
Bonsai Posted April 17, 2016 Author Share Posted April 17, 2016 I now added the server ip to the mta config file for: <http_dos_exclude></http_dos_exclude> I'm not sure yet if it helps anything tho. Bonsai Link to comment
MTA Team ccw Posted April 17, 2016 MTA Team Share Posted April 17, 2016 Check the server log for: HTTP: Connection flood from x.x.x.x Link to comment
Bonsai Posted April 18, 2016 Author Share Posted April 18, 2016 Hm, sadly there is no such error.. Link to comment
MTA Team ccw Posted April 19, 2016 MTA Team Share Posted April 19, 2016 Unzip this resource on both servers: https://nightly.multitheftauto.com/files/temp/ca ... e_test.zip Check the meta.xml and set the correct ip/port for the other server. Also make sure the ACL is updated as shown in the meta.xml comments. When the resource is running in both servers, enter the command 'begintest' The resource will continually send messages via callRemote and report errors. Show any errors here. Link to comment
Bonsai Posted April 20, 2016 Author Share Posted April 20, 2016 So I did as you said and did some tests with it. There was not a single error shown. As far as I understood it only tries to send once. Does that have any effect on the following messages? Like as long as the first message was not successfully sent, the second one won't be taken care of? But it should have shown an error anyway if it didnt get through. So, I really i don't why i had these huges problems before, i feel like it got better after I changed something, but sometimes it still has huge delays. I'll do some more tests with this tool later to make sure. Thanks for your help. Bonsai Link to comment
MTA Team ccw Posted April 21, 2016 MTA Team Share Posted April 21, 2016 The sends are queued and processed one at a time, but there should always be a response via the callback. I've updated the callRemote example to output errors/problems in the callback function. Link to comment
Fist Posted April 21, 2016 Share Posted April 21, 2016 maybe you just made bad code? I have happend to my self exact same thing but between client and server side's. I remaded bit code and it fixed a problem. Link to comment
Bonsai Posted April 21, 2016 Author Share Posted April 21, 2016 Yeah, thats what I thought too before I posted here. But the problem was not reproducible, and especially the delay problem can't be caused by a problem in the code I think. After I remade some part, it became a bit better because I got rid of one callRemote usage, so you wouldn't see a problem that often. Maybe the hoster was having a problem or something? Right now its working pretty good. Thanks again. Bonsai Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now