project-error / pefcl

pefcl (PE-Financial) is a financial banking resource for FiveM written in TypeScript and React.
Other
65 stars 67 forks source link

Bug: External transfers resulting in timeout #131

Open xXJamieXx opened 1 year ago

xXJamieXx commented 1 year ago

Describe the issue

Getting a timeout when trying to transfer to an external account, been debugging and it gets to getAccountFromExternalAccount but isn't able to retrieve the account. Can't figure out why it can't find any accounts from the extenal_accounts table. I've checked the database and the account is listed in there so drawing blanks :/

Expected behavior

Should successfully retrieve the account from the external_accounts table and be able to link that up with the account in question and successfully transfer the specified amount.

To Reproduce

Steps to reproduce the behavior:

  1. Open bank/phone app
  2. Navigate to transfer page
  3. Select account to transfer from
  4. Select external account to transfer to
  5. Enter amount to transfer
  6. Click transfer and after a lengthy time it will timeout and show an unsuccessful response to the player

Needed information (please complete the following information):

Additional context

While testing this, it has become apparent that when it runs through the process and eventually times out, nobody on the server is able to make any interaction with PEFCL while it tries to process the event and result in a timeout. This causes problems especially on larger servers where many players are trying to complete actions at the same time and facing longer load times and unresponsiveness due to one players action that results in a timeout.