Jump to content

callRemote Problem


Bonsai

Recommended Posts

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
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
  • MTA Team

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...