magicbug / Cloudlog

Web based amateur radio logging application built using PHP & MySQL supports general station logging tasks from HF to Microwave with supporting applications to support CAT control.
http://www.cloudlog.co.uk
MIT License
450 stars 189 forks source link

Local ADIF upload crashes server! #2829

Closed ChrisL79 closed 6 months ago

ChrisL79 commented 9 months ago

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):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

magicbug commented 9 months ago

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 commented 9 months ago

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

ChrisL79 commented 9 months ago

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

HB9HIL commented 9 months ago

@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 commented 9 months ago

@ChrisL79 were you able to test your adif file?

ChrisL79 commented 9 months ago

Yes. There were errors.

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

phl0 commented 9 months ago

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

ChrisL79 commented 9 months ago

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.

phl0 commented 9 months ago

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

ChrisL79 commented 9 months ago

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

phl0 commented 9 months ago

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

ChrisL79 commented 9 months ago

Thank you.

phl0 commented 9 months ago

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?

ChrisL79 commented 9 months ago

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: @.***>

phl0 commented 9 months ago

The import took almost exactly 8 minutes.

ChrisL79 commented 9 months ago

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

phl0 commented 9 months ago

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

ChrisL79 commented 9 months ago

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?