Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Movie covers gone !!! #973

Closed
peterpt opened this issue May 1, 2020 · 39 comments
Closed

Movie covers gone !!! #973

peterpt opened this issue May 1, 2020 · 39 comments

Comments

@peterpt
Copy link

peterpt commented May 1, 2020

I am using the latest release of streama , however i also tested in the previous release and happens too .
Without a reason many movie covers disappeared from streama database
streama

Could this be database corruption ?
Only the covers where gone .

@dularion
Copy link
Member

dularion commented May 1, 2020

No, unfortunately this has to do with tmdb changing their image paths. I gotta probably implement a fix that after startup asks the admin if he wants to fix all images... This will probably load a while depending on the size of the media library.
Another user on discord suggested that we can maybe from now on save the images in Streama instead of loading them on demand from tmdb... I might be able to combine all of that

@peterpt
Copy link
Author

peterpt commented May 1, 2020

Probably the best option would be saving the covers to local hard disk and adding them to the db like the media files , this way will save future changes in image paths from themoviedb .

Do you think you can create a patch for this without spending too much of your time ?
I say this because in a month we probably will not have any covers in the streaming app except those we added manually .

@dularion
Copy link
Member

dularion commented May 1, 2020

I am looking into it right now

@peterpt
Copy link
Author

peterpt commented May 1, 2020

ok , thank you

@rascal999
Copy link

+1 on referencing movie covers locally. It'd be awesome if we had the option in Streama not to have to load any external dependencies. It looks like only Google font and covers are pulled externally in v1.8.1.

@dularion
Copy link
Member

check the new release pls: https://github.com/streamaserver/streama/releases/tag/v1.9.0

hope it works

@jguerinet
Copy link

I downloaded the new release and ran the script, but unfortunately it did not (fully) work. From the logs, here are a few things I saw:

  • For some movies/shows I would sometimes get the random error:
    ERROR grails.app.services.streama.TheMovieDbService - Failed to fetch image data, null
  • At one point in the middle of updating the images, I got a much bigger error:
ERROR StackTrace - Full Stack Trace:
org.springframework.orm.hibernate5.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
        at org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:283)
        at org.grails.orm.hibernate.GrailsHibernateTemplate.convertHibernateAccessException(GrailsHibernateTemplate.java:704)
        at org.grails.orm.hibernate.GrailsHibernateTemplate.doExecute(GrailsHibernateTemplate.java:290)
        at org.grails.orm.hibernate.GrailsHibernateTemplate.execute(GrailsHibernateTemplate.java:230)
        at org.grails.orm.hibernate.GrailsHibernateTemplate.execute(GrailsHibernateTemplate.java:116)
        at org.grails.orm.hibernate.AbstractHibernateGormInstanceApi.performSave(AbstractHibernateGormInstanceApi.groovy:241)
        at org.grails.orm.hibernate.AbstractHibernateGormInstanceApi.save(AbstractHibernateGormInstanceApi.groovy:158)
        at org.grails.datastore.gorm.GormEntity$Trait$Helper.save(GormEntity.groovy:151)
        at org.grails.datastore.gorm.GormEntity$Trait$Helper$save$1.call(Unknown Source)
        at streama.Movie.save(Movie.groovy)
        at streama.Movie.save(Movie.groovy)
        at org.grails.datastore.gorm.GormEntity$save.call(Unknown Source)
        at streama.TheMovieDbService.$tt__refreshData(TheMovieDbService.groovy:310)
        at streama.TheMovieDbService$_refreshData_closure17.doCall(TheMovieDbService.groovy)
        at sun.reflect.GeneratedMethodAccessor716.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
        at groovy.lang.Closure.call(Closure.java:414)
        at groovy.lang.Closure.call(Closure.java:430)
        at grails.transaction.GrailsTransactionTemplate$2.doInTransaction(GrailsTransactionTemplate.groovy:96)
        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
        at grails.transaction.GrailsTransactionTemplate.execute(GrailsTransactionTemplate.groovy:93)
        at streama.TheMovieDbService.refreshData(TheMovieDbService.groovy)
        at streama.TheMovieDbService$refreshData$5.call(Unknown Source)
        at streama.TheMovieDbController$_checkAndFixImageIntegrity_closure9.doCall(TheMovieDbController.groovy:200)
        at sun.reflect.GeneratedMethodAccessor765.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
        at groovy.lang.Closure.call(Closure.java:414)
        at groovy.lang.Closure.call(Closure.java:430)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056)
        at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
        at streama.TheMovieDbController.checkAndFixImageIntegrity(TheMovieDbController.groovy:193)
        at org.grails.core.DefaultGrailsControllerClass$MethodHandleInvoker.invoke(DefaultGrailsControllerClass.java:222)
        at org.grails.core.DefaultGrailsControllerClass.invoke(DefaultGrailsControllerClass.java:187)
        at org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter.handle(UrlMappingsInfoHandlerAdapter.groovy:90)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:105)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.groovy:53)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:158)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.groovy:62)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at grails.plugin.springsecurity.web.SecurityRequestHolderFilter.doFilter(SecurityRequestHolderFilter.groovy:58)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:77)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
        at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:677)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
        at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:67)
        at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:54)
        at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:46)
        at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3117)
        at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2996)
        at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3376)
        at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:145)
        at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:582)
        at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:456)
        at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
        at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
        at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
        at org.grails.orm.hibernate.AbstractHibernateGormInstanceApi.flushSession(AbstractHibernateGormInstanceApi.groovy:279)
        at sun.reflect.GeneratedMethodAccessor714.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1215)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
        at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:923)
        at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:906)
        at org.codehaus.groovy.runtime.InvokerHelper.invokeMethodSafe(InvokerHelper.java:74)
        at org.grails.orm.hibernate.AbstractHibernateGormInstanceApi$_performSave_closure3.doCall(AbstractHibernateGormInstanceApi.groovy:244)
        at sun.reflect.GeneratedMethodAccessor685.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
        at groovy.lang.Closure.call(Closure.java:414)
        at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:54)
        at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:124)
        at com.sun.proxy.$Proxy109.doInHibernate(Unknown Source)
        at org.grails.orm.hibernate.GrailsHibernateTemplate.doExecute(GrailsHibernateTemplate.java:286)
        ... 127 common frames omitted

I got this one twice. It kept running after, but then got to the end and didn't stop itself (and the skipped + fixed was more than the total).
I waited a bit before trying to refresh the page, saw that a lot of images were still missing, and then ran it again. This time it ran all the way through but skipped everything (none were fixed).

Let me know if there's anything I can do to help with this problem, if there's any more info I can provide or whatever.

@virdb
Copy link

virdb commented May 12, 2020

It worked flawlessly for me (600+ movies and 30+ shows).
The first time i ran it, it finished but the GUI hasn't noticed, i had to check the logs.

@norbekaiser
Copy link

Worked almost perfect. Some covers were not updated, but updating them manually, wasn't too much of a hazzle.
Thank you very much for this update.

@kumitterer
Copy link

I'm afraid it didn't work out quite so well for me. It fixed a few of the covers, but the vast majority is still missing. Running it for a second time doesn't do anything at all - it just skips everything.

@dularion
Copy link
Member

ok, seems like the problem is that some images return the status code 200 (OK) but dont return an image. like this one
https://image.tmdb.org/t/p/w300/e9bs1IXQGCNxCSfco3NSGo7cSs9.jpg
good job, tmdb...

i will have to check the response body, if binary data comes back i can assume its an image, if not, its broken and i need to fix it. Basically, tmdb returns a false positive right now, which is why my script skips them

@peterpt
Copy link
Author

peterpt commented May 12, 2020

gonna try it .

Well it fixed some covers but others went missing , according to the log everything went ok but in reality 10 or 15 movie covers dont show up .
I manually could insert them , but the problem is that i am unable to insert a cover on the database from a movie that was not manually inserted by me but by the search movie page .
It should be an option to change the movie cover on all entries in database .

@dularion
Copy link
Member

I am releasing 1.9.1 with another try.

@dularion
Copy link
Member

@kumitterer
Copy link

Yeah, that did the trick for me. Thanks!

@peterpt
Copy link
Author

peterpt commented May 12, 2020

Working perfect , however it takes now more time to load the movie covers , believe that is because covers are between 100-500Kb of size .
Taking out that little delay everything is working fine .
Thank you for all your time on this issue .

@peterpt
Copy link
Author

peterpt commented May 12, 2020

Some note :
Streama stays at 100% CPU for a very long time just just when i refresh the webpage and i am not playing any movie .
streama

I connect to ssh to my server and when i load the webpage of streama after a few seconds i get my ssh disconnected dur to high CPU usage , never happened before on previous versions .
I am still doing an investigation to the large cpu usage from streama , ill post here some info as soon as i get into some conclusion.

@jguerinet
Copy link

Worked for me 99% (only one movie cover was missing, so very easy to manually fix), thanks a lot for your help and the quick turnaround.

@dularion
Copy link
Member

hm.. maybe this has something to do with the fact that its loading the images via streama now instead of tmdb. If you want, you can try to remove the reference to the streama-images, they are mostly meant as a backup anyway..
If you want to do that, try running these SQLs:

update video set poster_image_id = null, backdrop_image_id = null where api_id is not null;
update tv_show set poster_image_id = null, backdrop_image_id = null where api_id is not null;

@peterpt
Copy link
Author

peterpt commented May 12, 2020

I think the issue is related to buffering the big images thru the webserver to the client , because the images are big .
streama2

A good solution would be grabing the png from tmdb and saving them as jpg to be more smaller .
We are storing high quality images for posters in streama .

My question now is :
If i convert all these images png to jpg with same file name will streama recognize them and load them ?

@dularion
Copy link
Member

i think if you simply rename them, it wont change the filesize..
Also, I think it wont work anymore then, either..
What we really need is a proper size-based request for these images, tmdb does this with /w300/ etc for a width of 300px . I think thats pretty smart, I might implement that. That way the images arent loaded as raw.

@peterpt
Copy link
Author

peterpt commented May 12, 2020

what i thought was to convert them to jpg with same filename and delete the png files ?
Can that work ?
This is just posters of the movies so dont need to be a raw image .
My server is fiber 200Mbit , however streama have its own web server and is not attached to my nginx or apache webservers . That could also be the reason , not sure .

@dularion
Copy link
Member

I mean when streama funnels all those MB through the server it needs a ton of RAM, because for a brief moment all of that data is actually in the server RAM. then comes the smart GarbageCollector and tries to vacuum up any unused RAM to free it up. However, if no RAM can be freed up the GarbageCollector sort of spins out of control and keeps working without success, which drives up the CPU like crazy.
Welcome to java :D

@dularion
Copy link
Member

So we only have 3 options here: lower the file-size on request, resize all the images with a linux script if you got one handy, or increase the ram settings of streama..

@peterpt
Copy link
Author

peterpt commented May 12, 2020

so , i need to have the same file extension .
i launch streama automatically on server start without ram size specified but you think if i launch streama like :

java -Xmx1g -jar streama-xxx.jar (could solve the issue ?

@dularion
Copy link
Member

1g is likely not enough.. I'd shoot for somewhere between 2g and 4g, but i guess you could fiddle around with those settings..
but yea, you need the same extension i believe, because it appends that from the database extension string

@peterpt
Copy link
Author

peterpt commented May 12, 2020

ok , so maybe it would be nice to streama automatically have an option to resize the pictures on request in admin menu , the reason is simple , one of these days everyone must have a lot of hardware to run a simple streaming service running .
I say this because my server is just for mail and streama , and it have 4G of ram , it is a gigabyte bace 3000 https://www.gigabyte.com/Mini-PcBarebone/GB-BACE-3000-rev-10#ov
I build this server for private use of course , if i had ideas to make it public the i would think something bigger , however also this model was bought thinking in power low consumption .
In mean while i will resize all images here to fix temporary this issue .

@dularion
Copy link
Member

why not just remove the connection to those uploads using the sql above? that would quickfix it

@peterpt
Copy link
Author

peterpt commented May 12, 2020

but that will remove the posters right ?!! (the sql instructions) ?

@dularion
Copy link
Member

nope, it will just remove the reference to the uploaded file.
My Script from the 1.9.1 fix fixed the poster_path and backdrop_path to tmdb, and additionally uploaded the files to streama. Streama then has a functionality (from years ago) that an uploaded image in streama trumps the tmdb-image.
I mean, make a backup to be sure, but it should work just fine and use the backdrop_path and poster_path from tmdb again.

@peterpt
Copy link
Author

peterpt commented May 12, 2020

ok , do you have any idea in mind of a tool to open this database in linux ?
My server runs linux and this database is not connected to postgresql or mysql database engines .
Basically i am a little stuck in that process because i opened stramadb in windows sometime ago , but never on linux .
If you could give me an hint it would be fine . (case it does not take much of your time) .

If you want it could be tomorrow , it is turning too late in Europe and maybe you have things to do , if that so then drop here the tip tomorrow and i will execute it when i get from work .

@dularion
Copy link
Member

havent done it using raw linux shell, but maybe this would help: http://opensource-soa.blogspot.com/2009/03/how-to-use-h2-shell.html

Alternatively, you can use the built-in interface in streama: https://github.com/streamaserver/streama/wiki/Managing-h2-using-dbconsole

@peterpt
Copy link
Author

peterpt commented May 12, 2020

ok , thank you .
I will try to do it tomorrow .
I will let you know how it went .
Thanks a lot .

@peterpt
Copy link
Author

peterpt commented May 13, 2020

for an unknow reason i am unable to open the database using h2 tool
streamadb
i copied the db from linux to windows and installed the h2 tool to open the db in windows because the linux installer of the app is not ok , have some issue with path environment of java executables .
However i could not get it to work .
You told me that i am able to activated the builtin dbconsole from streama by changing some config , since i downloaded the jar file then i dont see where should i edit the config file .

@rascal999
Copy link

@peterpt I had this issue, I think you need to use an older version of the h2 tool. I use 1.4.199.

@peterpt
Copy link
Author

peterpt commented May 13, 2020

Forget it , i found the solution for what Antonia told me .
I never tought if we have a file in same directory as stream jar with application.yml that streama will give priority .
After i created that file i got access to the db .
I made the changes she told me , and now i am currently testing .

@peterpt
Copy link
Author

peterpt commented May 13, 2020

Everything is working perfect now .

@savkov
Copy link

savkov commented Jun 12, 2020

Is there a guide on how to update safely a non-docker version?

@norbekaiser
Copy link

i backup the db. Then Just start the new jar. That's it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants