• Hi
    I have a rather small, but annoying problem I couldn‘t come up with a solution. I am making a motorbiketrip all around southamerica with a friend. To put the daily tracks up there your tool has been and is incredibly helpful. So many thanks to start!

    To the issue. I track the routes using MapOut and then manually upload the GPX files and display them on above page. this all works fine. Now my most favorite was the total overview at the beginning which holds ALL the tracks and should show the total journey covered. Now until recently this was just displaying fine. Now recently it started not showing at first, then sometimes with a day or two delay or not at all. I realize there are 51 tracks today and it might just be an issue of too much data. However, it might also exist a simple solution to fix it. Since I like the total overview very much. Is there some solution you can come up with?

    Thanks in advance and best regards from El Bolsón,
    Viktor (& Emil and Lisi, the motorbikes writing the blog)

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author tinuzz

    (@tinuzz)

    Hi Viktor,

    Great journey, I’m jealous ??

    When I request only the track data for the ‘Todo el viaje’ map, I get a PHP error from your webserver:

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in xxx/wp-db.php on line 2022

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in xxx/functions.php on line 4639

    I think you should increase the memory_limit setting on your PHP instance.

    This nicely explains that it worked before, but started to show problems gradually, because the memory usage would increase with the number of tracks in a single query.

    I hope this helps.

    Best regards and safe travels,
    Martijn.

    Plugin Author tinuzz

    (@tinuzz)

    To be more clear: it’s not so much the number of tracks, but the number of points that’s the problem.

    You could consider using simplified versions of the tracks for the total overview, so that the number of points is lower. But that would require you to process the tracks outside of trackserver.

    With ‘simplified’, I mean something like this:
    https://www.gpsbabel.org/htmldoc-development/filter_simplify.html

    Best regards,
    Martijn.

    • This reply was modified 3 years, 1 month ago by tinuzz.
    Thread Starter lviktor

    (@lviktor)

    Thank you for the quick response Martijn!

    Unfortunately I am not hosting the WP Page myself and getting back to my friend hosting it, as it seems the memory-limit is fixed at 128MB or we haven‘t found out yet to change it anyways.

    Interestingly the above mentioned error is only thrown shortly after I updated the page in WP. After that I don‘t get any error but just a map without any tracks and any error.

    Thus only simplifying remains. I will look into it. I have only an iPad on my travels, let‘s see if I can find a workaround.

    Ultimately I could split the total overview to countries or so in order to reduce the total number of point, but as the total has a catch I‘ll follow the simplifying approach some more.

    Thanks for the assistance and hints and best regards,
    Viktor

    Plugin Author tinuzz

    (@tinuzz)

    Hi Viktor,

    “After that I don‘t get any error but just a map without any tracks and any error.”

    Yes. The track data is requested from Javascript with an AJAX request, which is supposed to return a JSON object. In your case, the response is not JSON, but HTML containing the error message.

    I think Trackserver would relay an error message to the user if the AJAX request would be unsuccessful, but in your case, the server is returning a 200 status, which means ‘OK’. So, basically, Trackserver is confronted with a successful request, but with invalid data, which it doesn’t really handle. It just doesn’t show any track data, because there is nothing to show.

    Apart from increasing the memory_limit or simplifying the tracks, there’s nothing to do about this in the short term, I’m afraid.

    Best regards,
    Martijn.

    Thread Starter lviktor

    (@lviktor)

    Again, thanks Martijn!

    FYI:
    I‘ve found a neat way to merge the tracks and downsize them in: https://gpx.studio/

    A bit of a hassle to merge all the tracks into one, so I don‘t have to upload them all again, but works in the end. Either preprocess them in the future seperately or reworking the total trip again and again each time but at least a solution.

    Thanks again and best wishes,
    Viktor

    If you need to do this regularly and are familiar with linux command lines, you can use gpxdo to write a bash script which does everything from downloading a range of tracks, merging them, limiting number of points and uploading it again. Gpxdo can do all of this. If you need help, please ask the author (actually, that is me).

    https://gpxity.readthedocs.io/en/latest/gpxity.html#gpxdo

    Plugin Author tinuzz

    (@tinuzz)

    Hi Wolfgang,

    Looks cool, I’ll take a look at that tool shortly. Nice to see other people’s solutions for manipulating GPX files ; I have written a few myself.

    There’s always GPSbabel, which can do everything and more…

    I checked out the simplification algorithms in GPSbabel, and I think I can implement one in PHP for in Trackserver. Maybe I’ll give it a go.

    Cheers,
    Martijn.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Maximum of tracks?’ is closed to new replies.