I am new to Wildfly, and deployment in general, so I apologize if this is a weird question. For a while now, I've been using Wildfly to deploy my application and haven't had any issues. However, recently, I started noticing that after a certain amount of time, changes made in my js files aren't reflected in the browser. I open the files up in the Chrome debugger tool and they aren't updated.
I read online that to solve this, I should shut down Wildfly and delete the tmp folder and then restart the server. When I did this in the beginning, files were being updated, but then I noticed it happened again, so I repeated the same steps. Every time, it seemed that issue would show up sooner and sooner, to the point where I can only deploy a few times before the issue comes back.
If someone can please give me any pointers, I'd really appreciate it. If I'm missing vital info in the question, please let me know so I can provide it. Thanks.
(I'm using Wildfly 24.0.0 Final in case that's important)
Related
In an Assignment it was asked what is the first thing to do before testing changes done in JavaScript, after deploying an application. My answer was to clean the browser cache because the cached content may affect the new changes. I want to know whether it is a valid and a good answer or are there some things to do prior to that? Thank you
A word of advice, not all users understand the principle of clearing the browser cache to obtain changes. I suggest you to increment you'r javascript file instead of taking into consideration that users will clear their cache.
But before deploying a modification, I advise you to do some tests. Several types of test exist, you can look for example at unit tests.
What a vague question to be asked, however I personally think about how a real user would use the system when I test it. Therefore, would I trust the user to clear the cache / cookies etc everytime they used the system? No. I would expect to be able to either close the browser and open (or simply refresh the screen). As mentioned in another answer, 'cache busting' should be handled by the developer during the build process, for example by hashing the javascript bundle.
I used to get into a habit of opening dev tools all of the time and relying on the 'disable cache' toggle, however after a few times of getting caught out by real users seeing different behaviour that what i was seeing during development, I moved to ensure that the bundles weren't cached in both dev and prod.
Let me preface by saying I have no idea of what I'm doing. I've inherited a system from a contractor that we hired to do a job. I'm not significantly familiar with web development, and I have no idea how the magic voodoo was configured or really works. If you're going to reply, be patient, and assume I don't know jack about what you're telling me - please don't leave anything "for the reader to figure out." I'm embedded by trade and would rather bang bits than develop back end code for a website.
Server is running on an embedded Linux platform (basis is OpenWRT). The core is Lua/Luci, but there's a plethora of HTM files that utilize both HTML and JavaScript.
What I want to do seems really, really straight forward, but I can't seem to make it work: There is a file in /etc that I want to be able to download from the server to the local machine. Needs to work with IE, Firefox, and Chrome.
I would have loved something like:
download
But it doesn't work for files outside the subdirectory area that lua/luci knows about (i.e. I can't "../../../etc/file")
I've tried several different things, but the biggest issue is I can't seem to get the lua/luci stuff to recognize anything new in the same directory that contains some of the htm files, nor anything from the server's root directory (e.g. /etc/file). Usually what I do goes back to the home page or displays:
No page is registered at '/admin/talon/file'.
If this url belongs to an extension, make sure it is properly installed.
If the extension was recently installed, try removing the /tmp/luci-indexcache file.
(And yes, I clear the cache before I reload the page).
I'm OK with creating a symlink to the /etc/, but that hasn't been fruitful, either - mainly because I really don't know what kind of magic the lua service is doing to find the existing files.
I'd prefer for the solution to be in just HTML and JavaScript.
Yes, I've looked around for a basic solution, but either the questions want to do more than just download, or there's not enough information for me to figure out what is supposed to be done.
Please post a full solution, not just snippets.
I was able to figure it out based on some other code within that same source. It worked on one page, but not another. Not sure why - just more sorcery. Had to work within the LUA scripting language to get to the file I wanted; HTML was straight forward. If I knew what the magic thing was to make it work, I'd post the actual solution, but I think the solution is somewhat unique to how the original developer put things together, so it wouldn't be useful to anyone else.
So, I'm trying to profile an existing large-ish node.js webapp.
It seems to run OK, when running normally, I added a debug launch configuration.
My first attempt, I left it running, attempting to load a very complex page - came back to find a 4GB profile log had filled the remaining space on the small partition it (and my system) is on causing all sorts of problems.
Did a quick test, running the server for only a few seconds, got a ~15MB profile of it loading some modules - but it works.
A second attempt - watching much closer, I started loading a simpler page as soon as the server was accepting connections (watching the profile log grow at ~3mb/s) - by the time the page had loaded, I have a 600MB log, stop the server to see the results.
After waiting for quite a long time, phpstorm complains it does not have enough memory - limited to 750MB.
I've increased it to 1500MB - but thought I should ask for some wisdom here before another test, as this profiler really does not seem practical!
Am I just expecting too much for this profiler to give me info on a complex app(and I should use a different profiler)?
Does this indicate some kind of problem with the app?
Perhaps I am doing something wrong?
All answers welcome!
Edit: the command phpstorm runs is /usr/bin/node --prof --logfile=v8-23-11-15_00-37-35-0.log --log-timer-events bin/www
OK, removing --log-timer-events makes the log a reasonable size, and the server runs at a decent speed! There is less info - but it still seems to contain much of what I am hoping/expecting to see.
Not marking this answer as accepted, as I feel I am still floundering in the dark a little more than I'd like.
I have been developing phonegap applications that need to make updates oftenly. The problem is pushing a new ipa to iTune Store take too long. So, I uploaded the application source codes(minified javascript) to my server and download it from application and "eval" the minified js files. But i feel using eval has limitations and also not the right way. So, can someone tell me the right way to accomplish this.
thank you so much.
I'd love to have something like this as well. You're already ahead of me w/your eval() approach - but I'd have the same concerns as you there. Here's what I'm aware is out there on this topic - hope this helps?
IdeaPress(?)
I just recently caught wind of this one - not sure how feasible but it claims to do exactly what we'd like. I have to say the main site looks a bit flaky but I will definitly be checking this out to see if it's feasible or not.
HockeyApp?
HockeyApp (possibly dead-end now). I thought there used to be a pretty clear solution for PhoneGap devs to integrate the HockeyApp API/feature set with their mobile apps but a recent Google search on this is turning up much less than I would think - so maybe it's a dead end now? http://goo.gl/GQOv5o
org.apache.cordova.file
This requires more work and I haven't pushed far enough yet to see if it truly could be a means of updating the app post-app-store-deployment. But based on what I've read if you're just updating code for your WebView you shouldn't have to worry about App Store rejection or anything. Related tutorial
Testflight App Testing (Apple)
I haven't gotten to play w/this yet but sounds like it could be promising for at least the beta/testing phase of development. I, like you, need a solution for end-users, not app testers, but I'll still be looking into this soon as it might replace me having to maintain my own over-the-air app installs for the best/testing periods.
I have a medium-sized ASP.NET MVC project with a lot of Javascript (Single-Page-App). Very often (dozens of times a day), when I edit the Javascript files and refresh it, I see in VS' output that it goes through the whole Application_Start process (as in (re-)starting the app).
This results in unwanted delays during development and after 2-4 such restarts, I get an InvalidOperationException "Not running in a hosted service or the Development Fabric.". Since I do run it in the emulator, it seems to be that after a few app-restarts, it loses its connection to the emulator. Apart from that, I even got (although very rare) OutOfMemoryExceptions, which I can't find out where they are coming from, because nothing in the web app should allocate much memory and my workstation does have quite a lot (32 GiB).
It can't be related to an idle timeout for the IIS (Express) worker process, since the JS changes often only took seconds. I tried to reproduce it by adding spaces to the JS file and saving it, repeating that a few times and then trying to refresh. Weirdly, I was unable to reproduce it this way.
I am out of ideas, help would really be appreciated :)
[Edit]
Not an answer yet, but a possibility. It seems like Web Essentials is compiling my LESS files each time I save them (even after I specifically deactivated that because ASP.NET Bundling and Minification already handles that), which result in quite a few additional writes because I have the habit of saving VERY often. Already contacted the developer, maybe it's a bug.
This is actually due to IIS behaviour. IIS recycles any app if there is any change in the files in its file structure.
I had a similar experience and detailed my understanding here: http://www.geekays.net/post/2008/10/14/ASPNET-webdomain-recycle-on-subfolder-changes.aspx