Service is down status [closed] - status

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
What is the best practice to inform users if the services is down? In my example it's an application upload function that may be over capacity.
Thanks.
Uli

There are many ways that this can be accomplished and it all depends on what best fits your particular application.
If all you are looking to do is disable a feature, like in your example of disabling the upload feature, you could put a prominent message at the top of that page that says that it is not currently available and then disable the upload button on that page.
If you plan to take down the whole site for maintenance, it's good to have it as a separate page that is not linked to the rest of your site in any way. That way you can modify anything within your site, and also make a lot of changes to your web server.

Have an error page that is pure HTML - that way if the database goes down, you are not showing an error page that is dependant on some kind of DB query. Otherwise, your error page, will error.

You could return an HTTP error code if it is a web/http upload endpoint.

In our company, we have a procedure that do something like that (on our apache server):
Stop a particoular service
Enter .htaccess and do a rewrite-url to a standard down page
When we came back:
Enter .htaccess and remove the rewrite-url
Restart services
This is done by a bash script called when we want to shut down some services.
You could do that with a demon that check if server is "overlogged" and starts that routine.

Related

Firebase don' update my changes on my custom domain [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I am using Cloud Run to run my app and I have it connected whit firebase, today I update a new version on Cloud Run, all perfect, I go to the URL and all my changes there are whit any problem, but when I go to my custom domain, I see the old version of my website broke, without CSS
I wear it because when I go to the link that CLoud RUn gives me, there is the new version without problems
Have you tried force refreshing your cache?
When you update a site and you see the active changes on some of it's URL access points but not all indicate that there is a cache in the middle. you can force clear your browser cache with F5, but if you are using a DNS cache like Cloud Flare, you will have to manually dump the cache from their services as well.

Will web scraping only cause harm to those who have a website? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
Today I scrape a website using beautifulsoup4 and try to fetch about 16.000 data on that site.
And just few minutes after that, that site got down and can't access about few hours.
So.. my question is:
Will web scraping only cause harm to those who have a website?
First of all, it is advisable to check out the robots.txt file of every site before bombarding it with automated requests like you just did. It is not good for the website owner as well as for you. In order to scrape a website, follow these steps before starting to write a web scraper:
Check if the website has an API available already to make your task easy. If not, then go to step 2.
Check out the robots.txt file which is present at www.anywebsite.com/robots.txt. If the owner has listed this page (which in most cases he will), you can see whether robots are allowed to access the website or not. If yes, then check out which pages are disallowed and also check if there are any rate-limits for it.
If the robots.txt file is not present, then make sure you are gentle enough not to shoot requests to the website at bullet-speed. It might cause harm to the owner and you might get blocked forever from accessing the site.

Wordpress admin interface takes forever to load [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
TLDR Version : Wordpress admin interface does not load
I have a WordPress blog, I have been using it for over 2 years.
Recently I have been experiencing this problem. Al pages login, add new post, dashboard i.e all admin interface pages take forever to load.
I tried debugging this problem, below is a network stat info from my firebug.
It seems that my wp-admin.min.css takes a lot time to load.
Also then I reliased may be this has something to do with the Wordpress Latest Update I had done. But I am not sure, how do i fix this ?
I have search a lot on this, but just couldn't find a solution for this.
It might not be your WordPress installation at all (but rather something about your own internet connection or machine setup). The login page loaded very quickly for me, and here you can see a complete analysis from Pingdom.
It took less than half a second to load. I would try a few of these things to narrow down on the problem:
Reboot
Try a different browser
Try a different computer
Try a different network / location

best way to implement a virtual directory redirection [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I have an aspx website on IIS 6.0 which has the address https://www.website.com
I have made a virtual directory under this called cvr, which I am redirecting to http://servername:8080/websitename
Is there a way to keep https://www.website.com/cvr in the address bar after navigating to it? As soon as I hit the website, it shows http://servername:8080/websitename in the address bar.
Both sites are on my company network and the https:// website has a certificate, so is accessible through the firewall.
The answer is probably easy, but haven't done it before. Any help would be appreciated.
Si
Are you trying to do this in strictly IIS? If so I dont believe you can do that. If you are using .NET code you can do a Server.Transfer and it will keep the URL that is has. I wonder if you could just have a default.aspx where you can do the Server.Transfer.
In case you didnt already know a Response.Redirect means, tell my browser to request this page. A Server.Transfer your server says, "I know what page you want, ill go ahead and serve that too you so, dont have to make an extra request" and the side effect of that is the URL stays the same.
The best bet would be to setup a reverse proxy fronting both sites and then redirecting as needed.
In general, doing some voodoo to keep the same name in the URL bar is frowned upon by everyone . There is this thing called phishing that is real unpopular these days . . .

Is there a wordpress plugin for creating an API from your site? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'd like to use the data from my wordpress site in an API form. Maybe REST with JSON output. I'm wondering if there's any plugins that automatically make the wordpress data accessible from outside the site its running on, similar to the way most web APIs work.
WordPress is basically a REST-powered platform to begin with. You enter a URL with a particular query string (sometimes buried in a 'pretty permalink') and the system returns a semi-static resource based on the layout and structure defined in your theme.
To build it into an 'API' you'd need to first identify what information you're returning and how you want to structure it. Do you want people to access your data via a typical link (http://blog.url/?post=xxx&category=xxx&whatever=xxx)? Or do you want to keep running a typical blog but allow API access through another mechanism?
If you want the second route, you could always hook a plug-in into WordPress' built-in XMLRPC service. Then users will make a request of something like http://blog.url/xmlrpc.php?resource=xxx&variable=yyy&somethingelse=zzz and your site would return whatever information you want (though this would be SOAP, not REST ... so it's really up to you).
See my answer here for a specific example with WordPress code ...
I have used this REST/JSON API plugin with some success, so while not for creating an API, you could possibly pull it apart and change it to your needs? This plugin seems to only support output, and not input (comments etc). There also seems to be discussion regarding creating similar api plugs for both input and output, and that might be one way to go, also. Have fun!
Yes there is a way, and I just found it!
You can go here: http://developer.wordpress.com/docs/api/
all you have to do is fill in your website into a request like:
https://public-api.wordpress.com/rest/v1/sites/$yourSiteHere/posts/
and you'll get a beautiful JSON back.
You can post comments, get data, and add queries pretty easily.
If you want to do more that requires login, you can use oAuth.
API Endpoints wordpress plugin lets you construct any API out of your WordPress site.
If you are a Wordpress plugin developer and you need a RESTFul API maybe thermal-api.com can help you: Wordpress plugin to connect to a REST API?
But I think the best way is using WP-REST-API: http://v2.wp-api.org/extending/adding/

Resources