Cloudlog icon indicating copy to clipboard operation
Cloudlog copied to clipboard

Local ADIF upload crashes server!

Open ChrisL79 opened this issue 1 year ago • 18 comments

This is for reporting bugs with the code, if this issue is regarding setting up on your local server please use the forum see readme for details

Describe the bug Importing local adif crashes cloudlog. Only possible to restart cloudlog by restaring apache. In etc php, i have increased memory to 512mb, increased max upload file size to 5M, post size to 8M. Timeout set to 2 minutes. Setting timeout higher makes no difference.

Even when splitting the log to 2mb files it still crashes.

Error is 504. Pegs cpu at 100%! . I scanned my log for dupes beforehand, there were none l, although this should not matter.

Running ubuntu server 22.04 on i5 with 32gb.

What am i missing here?

To Reproduce Steps to reproduce the behaviour:

  1. Upload adif

Expected behaviour For the adif log to upload without bringing the server to a crashing halt for everyone else, (or me)! Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context Add any other context about the problem here.

ChrisL79 avatar Dec 13 '23 18:12 ChrisL79

Sounds odd, for a machine thats got so much ram unless the i5 isn't very "hot" but I'd suggest digging into server logs to see if anything is provided I don't believe we have a bug in the code.

This could also be MySQL running out of resources somehow, you can turn on logging in /application/config/config.php and then you'll find logs in /application/logs which might prove useful, apache logs might suggest something too.

504 is basically server timing out.

magicbug avatar Dec 13 '23 21:12 magicbug

You might find increasing the Maximum PHP script run time helps but sounds like the server configs need some tweaking

magicbug avatar Dec 13 '23 21:12 magicbug

Thank you. Plenty for to be getting on with there. Offhand, do you know locations for imcreasing mysql resources and php runtime?

ChrisL79 avatar Dec 13 '23 22:12 ChrisL79

@ChrisL79

Please check the ADIF File with a validator as described on our Wiki Page:

https://github.com/magicbug/Cloudlog/wiki/ADIF-file-can't-be-imported

HB9HIL avatar Dec 13 '23 22:12 HB9HIL

@ChrisL79 were you able to test your adif file?

HB9HIL avatar Dec 14 '23 17:12 HB9HIL

Yes. There were errors.

No matter how i export it from log4om there is errors.

ChrisL79 avatar Dec 14 '23 18:12 ChrisL79

What does the CL logfile say about it? How may QSOs are in the file?

phl0 avatar Dec 14 '23 19:12 phl0

Around 7k. Tried all export options lile export as standard adif. Not got my head around log yet as suffering with Covid. Hard to concentrate.

ChrisL79 avatar Dec 14 '23 19:12 ChrisL79

I can offer to try to import into my dev env if you want.

phl0 avatar Dec 14 '23 19:12 phl0

That is very kind. Thank you so much. Let me know how i can get them to you and i will do it tomorrow.

ChrisL79 avatar Dec 14 '23 19:12 ChrisL79

Find my email on qrz.com. Callsign is DF2ET.

phl0 avatar Dec 14 '23 20:12 phl0

Thank you.

ChrisL79 avatar Dec 14 '23 20:12 ChrisL79

File received and imported into my dev. Besides some dupes 4462 QSOs were imported without issues... Can you elaborate on your setup? Maybe script timeout on your webserver?

phl0 avatar Dec 15 '23 12:12 phl0

Thanks for the info.

Self hosted, dedicated server. i5-32gb Script timeout possible. I need to tune settings. Do you have a few examples of where to start with settings values? All i have changd so far is max upload and post size.

How long did it take for you to import the log into your setup?

On Fri, 15 Dec 2023 at 12:06, Florian (DF2ET) @.***> wrote:

File received and imported into my dev. Besides some dupes 4462 QSOs were imported without issues... Can you elaborate on your setup? Maybe script timeout on your webserver?

— Reply to this email directly, view it on GitHub https://github.com/magicbug/Cloudlog/issues/2829#issuecomment-1857781305, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4F4G3MTA542LX6NTDSOBXTYJQ4OBAVCNFSM6AAAAABATUSBF6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJXG44DCMZQGU . You are receiving this because you were mentioned.Message ID: @.***>

ChrisL79 avatar Dec 15 '23 14:12 ChrisL79

The import took almost exactly 8 minutes.

phl0 avatar Dec 15 '23 22:12 phl0

Thank you. I need to find the reason it crashes my server.

ChrisL79 avatar Dec 15 '23 22:12 ChrisL79

Check script timeout and the log files of your web server as well as Cloudlog itself.

phl0 avatar Dec 15 '23 22:12 phl0

I have logging set at 4 (everything) and nothing was logged at all regarding the error, or anything of interest. I will look into apache logs next.

By script timeout im guessing you mean max execution time?

ChrisL79 avatar Dec 15 '23 22:12 ChrisL79