Showing posts with label dealing. Show all posts
Showing posts with label dealing. Show all posts
Wednesday, June 28, 2017
Dealing with Nginx 400 Bad Request HTTP errors
Dealing with Nginx 400 Bad Request HTTP errors
Today Ill write about something I experienced personally, on my websites.
Some visitors reported that they were getting a "400 Bad Request" Nginx error randomly when visiting pages. And when they start getting that error, they cant access the site anymore: itll output the same error no matter the page, until you "clear your cache and cookies".
The error is easily understandable and is likely to be caused by... too much cookie data.
Every time a visitor loads *any* page/content/file of your website, it sends the cookie data to the server.
Cookie data is sent under the form of 1 header line starting with "Cookie: ".
Basically, Nginx by default is configured to accept header lines of a maximum size of 4 kilobytes.
When a line in the headers exceeds 4 kilobytes, Nginx returns the 400 Bad Request error.
Cookie data sometimes gets big, so it causes the error. It particularly happens on forums like vBulletin, Invision and others.
So why does it happen only for some web browsers (Firefox, Chrome...) and not others? Because those browsers do not limit the amount of data a cookie may store. Or maybe they do, but the limit is higher than the default 4k of Nginx. Other browsers limit the amount of cookie data so they do not have the issue.
There is a simple fix for that. The large_client_header_buffers directive of Nginx allows you to define size of buffers that will contain large headers like those big fat cookies.
The directive specifies: the amount of buffers, and the size of buffers. You basically need to increase the size.
In your http block (or your server block, if you want to apply the setting at the virtual host level), insert this directive with a size larger than 4k (actually the default size can be 8k depending on your system, so lets make it... 16k):
http {
[...]
large_client_header_buffers 4 16k;
[...]
}
Save your configuration, reload nginx by running /usr/local/nginx/sbin/nginx -s reload and it should now be fine. If you ever get the "400 Bad Request" again, you could either increase this value once more or look into the code and see why cookies get so big.
Wednesday, May 31, 2017
Dealing with Spyware Attack
Dealing with Spyware Attack

Spyware or Spyware is a program that installs itself without your knowledge, and usually it will monitor the movement of users, but even worse it will control the use of the computer. Among the symptoms that indicate your computer has been infected with spyware are:
- it is transferred to a re-visit your site to other sites
Advertising pop-ups- Internet access to slow
- the computer performance to slow down
- the computer becomes unstable There are several free anti spyware software such as:
- Spybot Search and Destroy (http://www.safer-networking.org/en/home/)
- Lavasoft Ad-Aware SE (http://www.lavasoft.com/)
- Microsoft Windows Defender (http://www.trendsecure.com/portal/en-US/threat_analytics/hijackthis.php)
Friday, May 5, 2017
Dealing with Mono under Fedora 25
Dealing with Mono under Fedora 25
As you know the new Fedora come with dnf tool options you can use to define a DNF repository ( see link ).
This can be a problem for new users if want to install the mono development tools because they can get this error:
... warning: /var/cache/dnf/download.mono-project.com_repo_centos-beta_-36cf85be8e79dffc/packages/mono-devel-4.8.0.483-0.xamarin.1.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID d3d831ef: NOKEY
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing dnf clean packages.
Error: Public key for mono-devel-4.8.0.483-0.xamarin.1.x86_64.rpm is not installedTo fix that error you just need to use this commands:
[root@localhost mythcat]# rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"[root@localhost fedora25_test001]# dnf config-manager --add-repo http://jenkins.mono-project.com/repo/centos/
Adding repo from: http://jenkins.mono-project.com/repo/centos/
[root@localhost fedora25_test001]# dnf update
[root@localhost mythcat]# dnf install mono-devel...[root@localhost mythcat]# dnf install monodevelopNow you can start the monodevelop with this command:
[mythcat@localhost ~]$ monodevelop I make a simple mono GTK# window into few steps:

The result of project come with this files:
[mythcat@localhost ~]$ cd fedora25_test001/
[mythcat@localhost fedora25_test001]$ ll
total 100408
-rw-rw-r--. 1 mythcat mythcat 4163 Feb 5 23:17 Assembly-CSharp.csproj
-rw-rw-r--. 1 mythcat mythcat 4163 Feb 5 23:17 Assembly-CSharp-vs.csproj
drwxr-xr-x. 2 mythcat mythcat 228 Feb 5 23:17 Assets
-rw-rw-r--. 1 mythcat mythcat 1452 Feb 5 23:17 fedora25_test001-csharp.sln
-rw-rw-r--. 1 mythcat mythcat 1448 Feb 5 23:17 fedora25_test001.sln
drwxr-xr-x. 4 mythcat mythcat 4096 Feb 5 23:39 Library
drwxr-xr-x. 2 mythcat mythcat 4096 Feb 5 23:39 ProjectSettings
drwxrwxr-x. 6 mythcat mythcat 143 Feb 5 23:18 test_Data
-rwxr-xr-x. 1 mythcat mythcat 49128408 Feb 5 23:18 test.x86
-rwxr-xr-x. 1 mythcat mythcat 53652633 Feb 5 23:18 test.x86_64
Saturday, April 8, 2017
Dealing with Ubuntu performance problems if you have an integrated video card
Dealing with Ubuntu performance problems if you have an integrated video card
On my work computer, both the latest Linux Mint and Ubuntu variants had huge performance problems in the last two months. When I had numerous tabs open (some with flash video) in Chrome, the computer turned sluggish, and after some time froze completely. I had to press the reset button once or twice a day lately - and that is really not healthy for the system.
Computer specs:
- Intel(R) Core(TM)2 Quad CPU Q9400 @ 2.66GHz
- 4GB RAM
- Graphics: Intel� G45/G43
I believe that the problem was caused by flash. I installed the Flashblock extension in Chrome and also turned off the 3D accelarated unity desktop of Ubuntu by installing gnome-session-fallback and choosing it at next logon.
The combined effect is amazing, the computer is blazing fast again...
Installing gnome-session-fallback:
sudo apt-get install gnome-session-fallback
One more thing:
The panels in the fallback mode can only be edited by pressing alt + super + right click...
UPDATE:
The whole problem was caused by the lack of enough ram. Just adding 1GB to the previous 4 that I had eliminated all problems. According to top I use about 4.7GB when using virtualbox.
Sunday, April 2, 2017
Dealing With Farmers through the Auction House
Dealing With Farmers through the Auction House
Hey folks!
I received a reader email yesterday asking a question that is in all our heads, and after starting to answer him, I decided to make a post due to this being an issue I hear quite a bit.....
Hi Alto,
So I have been reading through a couple of blog posts from your site and others. I havent been able to find the topic that I have been looking for. I understand that its much easier to have people farm mats for you while you pay a certain price. Im just not sure how to approach them in making the offer to send their mats to me for a good price. Speaking about buying it for a good price how much would be a reasonable offer....maybe 20g off the AH price?
Thanks,
Alex
Alex,
We all have this thought, and most (it seems) do not act on it. We bite the bullet, buy our mats from the AH, and go on with our day. I fall into that category at times, normally assuming (and you know what they say about assuming...) that they A) dont speak english B) wont respond or C) dont care to deal with people (thats why its on the AH in the first place, and not in trade).
![]() |
| Serious "Sweatshop" WoW Gold Farming |
Lets look at an example: Obsidium Ore. We know since patch 4.1.0 that the "floor" price is 30g, but if you use my 6/36 method, you know from some quick math that they are worth 52g on your server (if you arent aware of my "rule", you can read the comments on 4.1.0: Whatcha need to know). On the AH, they are 40g and there is one farmer that has 102 stacks at that price. Straight away, we know that at a 12g profit per stack (at current prices) we can make a quick 1200g, right? Easy money, just takes some time to profit.
So now I ask the question back to you, is 1200g worth it to you for your time to "shuffle" them? Lets just say for instance that it is. Do you buy em all up anyways? Think about this.....say you do talk to the farmer. Is 35g per stack a fair offer? You spend 10 minutes arguing with him (due to he posted 150 stacks, and 48 had already sold at the 40g) and you lowball an offer of 30g to buy em all right now (he stands to lose 1000g by selling them to you now, and you stand to gain 1000g). He gets offended, and basically tells you to F off. Sound familiar? Probably.
What I would do is offer him to save time. You know that the Obsidium Ore usually has sold for 42g per stack since the patch dropped last week, right? So the current 40g is a good price. I would send him/her an in game mail stating:
Dear XXXXX,
I purchased all your stacks (102) of Obsidium Ore at 40g in the AH. I would like to have a constant supply, feel free to save the AH fees and COD me as many as you can get (no more than 200 stacks a day) for 38g per stack and you wont have to deal with posting them. Deal? Lemme know!
Thanks again!
Obviously, if you see the person in game, you can do basically the same in chat. Why did I not offer less? I want to establish a relationship with them. I dont want to gouge them, as I am still profiting.
Ignore is a powerful function in WoW (see a post by Khailor about ingnoring) and to lose a prospective farmer would be bad. After a few days of getting the 200 stacks, if you are greedy, you can let them know that you have a supplier for 35g per, if you want to risk losing them. Its a risk, and....well.....is it really worth losing a constant supply to gain a few hundred gold? In my eyes, no. But you might see it differently.
Are you feeling where I am going with this? Its all about where you want your profit margin to be. If you are profitable vs. time, then dont hesitate to snatch em up at the 40g (and still send the mail). If they are 50g in the AH, is it worth only 200g profit for your time? I would think not, that is when you would push the envelope and ask for 40g (for at least a 1K profit on your side).
Overall, I hope that gives you a bit of insight on my thought process, you can either use it or lose it. There are quite a few variables when getting new farmers, so take my advice with a grain of salt. 72% of the time it works 51% of the time (or something like that...who knows really). Remember too that if you dont buy them, someone else will, and like that famous guy in that famous movie said "If you arent first, you are last". Words to live by in the AH....
I have an oldie but a goodie post on Finding Farmers on your Server if you want to read a bit more.....
I am hoping that some of my readers might have seen similar issues, if so, holler out what you did or do in this style situation (and no xander, not your idol "The Situation").
Subscribe to:
Posts (Atom)
