developeranaz / Mega-index-heroku

Mega nz heroku index, Serves mega.nz to http via heroku web. It Alters downloading speed and stability
GNU General Public License v3.0
243 stars 394 forks source link

bandwidth error after downloading 3 gb content #25

Open Ameerak124 opened 2 years ago

Ameerak124 commented 2 years ago

ReadFileHandle.Read error: low level retry 4/10: Http Status: 509 Bandwidth Limit Exceeded

developeranaz commented 2 years ago

Use download managers like ADM FDM or aria2, After every quota limit pause your downloads and then go to heroku deployed application and try using restart dynos. After restarting your application's dyno resume your downloads

developeranaz commented 2 years ago

Is it possible to make the dynos restart automatically at a certain time interval? so that you don't need to open your Heroku everytime you want to download from your index just to bypass the bandwidth limit.

I had done that locally but i need some time to commit. As per your request i'll make it faster, please be patient.😅

fcourse51 commented 2 years ago

Bro its sept & I am still waiting for it. Buddy please commit it soon. I am frustrated of restarting the dynos again & again.

developeranaz commented 2 years ago

Bro its sept & I am still waiting for it. Buddy please commit it soon. I am frustrated of restarting the dynos again & again.

I apologise for losing those files; however, Heroku's free Dynos are coming to an end, so I don't want to recreate them. This repository may also result in the suspension of your Heroku account.

I won't say that I won't make, it would take too long to recreate those files. Perhaps need a month to finish it.

fcourse51 commented 2 years ago

Got it pal. Can you create an explanation video of the code. I dont know which laung nor the procfile packages you have used to make the code. But in python you can create a while loop with try except block to handle the error [quote limit] then run a cli command to restart the dyno. If you can explain me the code maybe I can make a new version of it using python. And yes I know heroku is down soon but there still hope Railway, versal you can try that too.

developeranaz commented 2 years ago

I'm not a good explainer. I had made a pull request, but I had completely forgotten what I had done. Without using Python, I believe there are better ways to do fix. Today I don't feel well. 😰 You can leave a message here. If I have time, I'll respond to your issue. 🙂

developeranaz commented 2 years ago

I modified some of my older files and added Mega quota bypass. You use it at your own risk. Four additional environment variables are required for the new feature. Change Variable Auto_Quota_Bypass to true to activate Auto-Quota-Bypass Feature

Deploy it directly from my Readme Mega-index-heroku

  1. APPNAME --> Use Your appname same used in Heroku's webapp. Don't use your app link, Use Heroku's App name. Its optional only if you need auto quota bypass. Your information is secure between you and Heroku.
  2. Heroku_Password --> Your Currently deployed/deploying Heroku Password. Its optional only if you need auto quota bypass. Your information is secure between you and Heroku.
  3. Heroku_Email_Id --> Your Currently deployed/deploying Heroku Email. Its optional only if you need auto quota bypass. Your information is secure between you and Heroku.
  4. Auto_Quota_Bypass --> true/false |Use true or false values. Fill your Optional Config Variables if true.
fcourse51 commented 2 years ago

Thanks pal for your efforts. But when I am downloading 10 files simultaneously it does not restarts the dyno automatically. For 3 files it was working awesome yesterday I tested downloading a 5gb 3zips. Do you know what's wrong with this with multiple downloads the dyno are not restarting automatically.

Error is : : Process running mem=577M(112.5%) 2022-10-06T17:33:51.978564+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)

https://stackoverflow.com/questions/8875280/heroku-error-r14-memory-quota-exceeded-how-do-i-solve-this

developeranaz commented 2 years ago

Free Heroku is not a supercomputer 😅, only has 512mb of RAM. I don't recommend doing multiple downloads at the same time because it will exceed your allocated memory and either heroku or rclone will exit automatically.

if Heroku exits automatically: Your web app will receive an error and gives application error

if rclone exit automatically: I also added a failsafe line of code to restart rclone without quota bypass if it exited.

As a result, I recommend that you create multiple webapps or indexes using multiple accounts.

fcourse51 commented 2 years ago

I got it bro 😅, Can you tell me how can I use my windows laptop to run this mega index. I have 2 laptops and a good internet connection. So I think 8 gb ram can help me here and I can download the files through the 2nd laptop.

developeranaz commented 2 years ago

I got it bro 😅, Can you tell me how can I use my windows laptop to run this mega index. I have 2 laptops and a good internet connection. So I think 8 gb ram can help me here and I can download the files through the 2nd laptop.

You can run it in your laptop but after every 5gb you need to restart your internet modem to rotate your IPs, i know thats not a good idea.

so i only suggest, to download with the help of Heroku. Create multiple indexes using different heroku accounts or different deployments.

fcourse51 commented 2 years ago

Got It buddy. Did you test this mega index on other free tier platforms such as Railway, versal. Heroku is going to be dead soon.