Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    GC auto or not?

    Scheduled Pinned Locked Moved GPy
    4 Posts 3 Posters 190 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K Offline
      kjm
      last edited by

      We continue to play whack-a-mole with GPY lte connection stability. As we eliminate problems we are left with more obscure errors (eg OSError: [Errno -29312] MBEDTLS_ERR_SSL_CONN_EOF). The only thing they have in common when googled is the suggestion to import gc; gc.collect() Is this what people do when they can't think of anything better to do? I thought garbage collection was supposed to be automatic? Should I simply run gc permanently on a loop in a separate thread?

      A 1 Reply Last reply Reply Quote 0
      • C Offline
        crumble
        last edited by

        GC cost time and power. This implementation cannot fix fragmentation, so it depends on your problem, In the case of fragmentation, it may not be helpful in any states. So it is better to redesign your program, so that it will not allocate huge blocks over the whole runtime.

        Calling the GC takes time. If people were lucky, this may have fixed timing, synchronization and memory sccess problems in the past. Since IDF 3.2 a lot of them are fixed, So it may not be the multi tool for strange issues any longer ;)

        1 Reply Last reply Reply Quote 0
        • K Offline
          kjm
          last edited by

          tnx, do you know what the 'ho 0 tail 12 room 4' gpy reboot message means?

          1 Reply Last reply Reply Quote 0
          • A Offline
            andreas @kjm
            last edited by andreas

            Dear @kjm,

            @kjm said in GC auto or not?:

            We continue to play whack-a-mole with GPY lte connection stability. As we eliminate problems we are left with more obscure errors (eg OSError: [Errno -29312] MBEDTLS_ERR_SSL_CONN_EOF).

            These resources might give you some clues:

            • https://github.com/espressif/esp-idf/issues/1009
            • https://github.com/espressif/esp-idf/issues/3624
            • https://github.com/espressif/esp-idf/issues/4127

            I am really encouraging you to give the Dragonfly firmware [1] a try as it already fixes some of the problems outlined within those issues, especially the PSRAM bug.

            With kind regards,
            Andreas.

            [1] https://community.hiveeyes.org/t/dragonfly-firmware-for-pycom-esp32/2746

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post

            Pycom on Twitter

            Pycom