Fork me on GitHub
#luminus
<
2017-06-21
>
hackeryarn00:06:41

Hi, I am having an issue where I just added a new page using reagent. Locally it appears for an instant and then disappears and when I deploy it, it doesn't appear at all.

hackeryarn00:06:40

I built it very similar to the Web Development with Clojure book, and I am at a bit of a loss as to why this is happening only on a single route of my app.

hackeryarn03:06:04

I figured out the issue. I was using a destructuring session/get! to get the table data, which was causing the flicker. By switching it to session/get it was fixed.

hackeryarn13:06:50

I am trying to deploy on a free instance of heroku but I get the following errors in my logs when i try to run heroku run lein run migrate. Has anyone been able to get around this?

2017-06-21T13:28:46.063924+00:00 app[api]: Starting process with command `lein run migrate`
2017-06-21T13:28:52.692937+00:00 heroku[run.1423]: State changed from starting to up
2017-06-21T13:28:52.595667+00:00 heroku[run.1423]: Awaiting client
2017-06-21T13:28:52.618633+00:00 heroku[run.1423]: Starting process with command `lein run migrate`
2017-06-21T13:29:33.790220+00:00 heroku[run.1423]: Process running mem=896M(174.0%)
2017-06-21T13:29:33.790220+00:00 heroku[run.1423]: Error R14 (Memory quota exceeded)
2017-06-21T13:29:53.425823+00:00 heroku[run.1423]: Process running mem=994M(194.2%)
2017-06-21T13:29:53.425924+00:00 heroku[run.1423]: Error R14 (Memory quota exceeded)
2017-06-21T13:30:13.758884+00:00 heroku[run.1423]: Process running mem=1076M(209.2%)
2017-06-21T13:30:13.759003+00:00 heroku[run.1423]: Error R15 (Memory quota vastly exceeded)
2017-06-21T13:30:13.759111+00:00 heroku[run.1423]: Stopping process with SIGKILL
2017-06-21T13:30:16.996720+00:00 heroku[run.1423]: State changed from up to complete
2017-06-21T13:30:16.984168+00:00 heroku[run.1423]: Process exited with status 137

hackeryarn13:06:05

and the migration fails

yogthos14:06:13

it’s probably better to do migrations through the app

yogthos14:06:37

you can pass migrate argument directly to the app when it starts to run migrations

hackeryarn15:06:16

Ah I see, I will have to give that a shot.

hackeryarn15:06:16

Once I have it figured out I will add it to the heroku deploy docs. Because right now they recommend what I was trying.

codefinger16:06:13

Do migrations require a lot of memory?

yogthos16:06:29

running migrations from the app shouldn’t require any additional memory

yogthos16:06:09

@hackeryarn ah thanks, those definitely shoudl be updated

donyorm18:06:36

@yogthos in relation to the earlier error, I found out that immuntant only depends on webjars-locator-jboss-vfs for wildfly support from the #immutant channel. Why does luminus use it?

yogthos19:06:40

you can create a war using the +war flag that deploys to wildfly

yogthos19:06:51

so maybe that should only be included in that case

donyorm19:06:49

@yogthos That's what @tcrawley told me. I did manage to figure out what dependency was causing the issue. webjars-locator-jboss-vfs wanted a newer version of webjars-locator-core than ring-webjars did, and apparently the way boot handled that caused the issue. When I excluded webjars-locator-core from ring-webjars the above issue went away. However I'm now getting a new issue

donyorm19:06:30

Whenever I try and run the project it starts us normally, the the nrepl server immediately stops and the program proceeds to close down without any error message. The only thing out of the normal is this message: org.projectodd.wunderboss.WunderBoss - Returning existing component for org.projectodd.wunderboss.web.Web:-1645144552, ignoring options.

yogthos19:06:28

hmm haven’t seen that one before

donyorm19:06:52

does lein run pass any args to -main? I don't have boot set up to do that, so that could be an issue

donyorm19:06:20

Looks like the same message was appearing here: https://github.com/luminus-framework/luminus-template/issues/214, though with different cirumstances and results. I'm not sure if it's related

yogthos22:06:41

lein shouldn't be passing anything to main, however it does do profile merging

yogthos22:06:53

so the environment variables might end up being different

donyorm23:06:14

but I'm using a default project from a template, so their shouldn't be any environment variables set, right?

yogthos23:06:51

this gets set by default :jvm-opts ["-server" "-Dconf=.lein-env"]

yogthos23:06:27

and .lein-env is used to track profile generated config, however that should be empty if you're not using a database

donyorm23:06:06

got it. I got all that going through, so that's not the problem

donyorm23:06:42

BTW, I have the project on github for sharing/testing purposes if you want to inspect my setup https://github.com/DonyorM/luminus-boot

donyorm23:06:41

So the above behavior is the exact same behavior I get when I start the app with lein run then connect to the nrepl server and run (stop-app). So I guess something isn't going write with the nrepl server