Tag Archives: Life

DbProviderFactories and machine.config in Framework/Framework64 fun

Fun today. I was trying to use FirebirdClientFactory from FirebirdClient installed in GAC. Because it was used globally I was not editing app.config/web.config but machine.config. I went to Framework etc. directory and modified machine.config. And … and it still wasn’t working. Fast forward, I spent maybe an hour trying to figure out what’s wrong. I was hopeless. Everything seemed fine. Randomly cd-ing through directories and thinking what I’m missing, I realized I didn’t modified machine.config in Framework64. Stupid mistake.

Sure after I corrected myself everything started working. Hope my story will save you time.

Jak (ne)zrušit službu u VSHosting – part deux

Když jsem psal předchozí příspěvek čekal jsem jestli se něco stane. A stalo. Ne, problém se nevyřešil, ale celá věc dostala zajímavý spád. Řekl bych, že z toho pěkně vybruslili.

Poté co jsem výše odkazovaný příspěvek publikoval jsem odkaz zaslal i do VSHostingu – všehovšudy je to veřejné a nemám (a i jsem to uvedl) problém s tím, pokud by někdo z VSHostingu přidal komentář – jsem dostal odpověď (překvapivě v 1:28). Údajně celou věc projednávali a chystali se mne kontaktovat. Zajímavé, že na první ani druhý email nikdo nereagoval a nyní odpověď. Popravdě jim to nežeru (počkejte na druhý zvrat níže). Předpokládejme, že opravdu celou věc opravdu projednávali. Dva týdny? Proč jsem nedostal alespoň odpověď ve stylu “Řešíme to, ozveme se později.” (připusťme např. odpovědnou osobu na dovolené)? Nevadí. Druhý zvrat přišel o několik vět později. Prý vzhledem k publikaci předchozího příspěvku o kompromisní řešení nemám zájem a tím pádem už není co dál řešit.

Musím přiznat, že tento obrat je skvělý a sám bych jej nevymyslel. Míč se přesunul na mojí stranu a finito – “mohlo to jít, ale posral sis to” jinak vzato “dohodnout jsme se stejně nechtěli, ale teď to krásně přehrajeme na tebe a jsme z toho venku”. Brilantní.

Pokud máte nějakou aplikaci, která by jeden menší server (1CPU, 1GB RAM, 30GB HDD) potřebovala, dejte mi klidně vědět.

Jak (ne)zrušit službu u VSHosting

Jak (ne)zrušit službu u VSHosting – part deux

Vetšinou se snažím psát hlavně o službách apod., u kterých jsem se setkal s výjimečně dobrým přístupem. Stežovačů je všude dost.

Ale pro tentokrát to bude změna. :) Před skoro dvěma lety jsem potřeboval pro jeden projekt menší server. Po průzkumu trhu a pár doporučeních padla volba na VSHosting. Konkrétně jejich VDS/VPS. Pro projekt to stačilo a cena byla slušná. Zaplaceno bylo rovnou na rok, proč si přidělávat administrativu. Po roce se server prodloužil, žádný problém. Nyní ale vyvstala potřeba provoz ukončit. Toliko k úvodu do “problému”.

Obrátil jsem se tedy na obchodní oddělení s žádostí o ukončení. Předpokládal jsem nějakou plus minus měsíc výpovědní lhůtu a dobropisaci zbytku (přibližně půl roku) nevyužité částky. Jaké bylo moje překvapení, když, po urgenci, jsem byl odbyt odpovědí, že službu nelze ukončit.

Zde bych se rád zastavil. Jedna se o VPS. Zrušení je otázka deseti minut a žádné “zbytky” (jako například po fyzickém dedikovaném serveru). Slušně jsem se tedy zeptal, zdali se přeci jen nemůžeme domluvit, že zbývá ještě skoro polovina předplaceného období a že jsem pripraven akceptovat nějakou, oběma stranám vyhovující, výpovědní lhůtu. Po prvním týdnu bez odpovědi, urgenci a druhém týdnu stále bez odpovědi, stále bez zrušení…

Veřím, že je toto v podmínkách podchyceno. Předpokládal bych ale, že dobra platební morálka, neporušovaní podmínek, snaha o domluvu atp. by zasloužila alespoň odpověď. U VSHosting asi ne… Jasně, prachy mají, tak co.

One day of my life – debugging SQL generator for Entity Framework support in .NET provider for Firebird

Couple of days back I was hunting some problem in code, that processes and later translates LINQ queries preprocessed by Entity Framework. The bottom line is that you are in code, where you have pieces of query, you’re rewriting these (even partially) or exchanging/adding new pieces if needed. You don’t have whole picture, because pieces are changing and so on.

So even if you partially know what you are producing, at the end you have to look at final SQL command and see whether it’s correct and/or semantically same as previous one, if you applied some changes or optimizations.

It took my roughly a day to find cause of issue and fix it. During this I created a lot of notes with commands and did a lot comparisons. I am placing these here, thus you can take a look at these and enjoy the feeling with me. If you’re interested, you can also check the SqlGenerator class, where I was working mainly.

SELECT 
"Skip1"."Limit1"."id_memo" AS "id_memo", 
"Skip1"."Limit1"."id_text_grup" AS "id_text_grup", 
"Skip1"."Extent2"."nom_grup" AS "nom_grup"
FROM ( SELECT SKIP (0) "Limit1"."id_memo" AS "id_memo", "Limit1"."id_text_grup" AS "id_text_grup1", "Extent2"."id_text_grup" AS "id_text_grup2", "Extent2"."nom_grup" AS "nom_grup"
	FROM   (SELECT FIRST (45) "Extent1"."id_memo" AS "id_memo", "Extent1"."id_text_grup" AS "id_text_grup"
		FROM "memos" AS "Extent1"
		ORDER BY "Extent1"."id_memo" ASC ) AS "Limit1"
	LEFT OUTER JOIN "texts_grups" AS "Extent2" ON "Limit1"."id_text_grup" = "Extent2"."id_text_grup"
	ORDER BY "Limit1"."id_memo" ASC
)  AS "Skip1"
SELECT SKIP (0) 
"Limit1"."id_memo" AS "id_memo", 
"Limit1"."id_text_grup" AS "id_text_grup", 
"Extent2"."nom_grup" AS "nom_grup"
FROM   (SELECT FIRST (45) "Extent1"."id_memo" AS "id_memo", "Extent1"."id_text_grup" AS "id_text_grup"
	FROM "memos" AS "Extent1"
	ORDER BY "Extent1"."id_memo" ASC ) AS "Limit1"
LEFT OUTER JOIN "texts_grups" AS "Extent2" ON "Limit1"."id_text_grup" = "Extent2"."id_text_grup"
SELECT SKIP (0) 
"Limit1"."id_memo" AS "id_memo", 
"Limit1"."id_text_grup" AS "id_text_grup", 
"Extent2"."nom_grup" AS "nom_grup"
FROM   (SELECT FIRST (45) "Extent1"."id_memo" AS "id_memo", "Extent1"."id_text_grup" AS "id_text_grup"
	FROM "memos" AS "Extent1"
	ORDER BY "Extent1"."id_memo" ASC ) AS "Limit1"
LEFT OUTER JOIN "texts_grups" AS "Extent2" ON "Limit1"."id_text_grup" = "Extent2"."id_text_grup"
SELECT SKIP (0) 
"Limit1"."id_memo" AS "id_memo", 
"Limit1"."id_text_grup" AS "id_text_grup", 
"Extent2"."nom_grup" AS "nom_grup"
FROM   (SELECT FIRST (45) "Extent1"."id_memo" AS "id_memo", "Extent1"."id_text_grup" AS "id_text_grup"
	FROM "memos" AS "Extent1"
	ORDER BY "Extent1"."id_memo" ASC ) AS "Limit1"
LEFT OUTER JOIN "texts_grups" AS "Extent2" ON "Limit1"."id_text_grup" = "Extent2"."id_text_grup"
ORDER BY "Limit1"."id_memo" ASC
SELECT SKIP (0) 
"D"."id_memo" AS "id_memo", 
"D"."id_text_grup" AS "id_text_grup", 
"E"."nom_grup" AS "nom_grup"
FROM   (SELECT FIRST (45) "C"."id_memo" AS "id_memo", "C"."id_text_grup" AS "id_text_grup"
	FROM "memos" AS "C"
	ORDER BY "C"."id_memo" ASC ) AS "D"
LEFT OUTER JOIN "texts_grups" AS "E" ON "D"."id_text_grup" = "E"."id_text_grup"
ORDER BY "D"."id_memo" ASC
SELECT SKIP (0) "Limit1"."id_memo" AS "id_memo", "Limit1"."id_text_grup" AS "id_text_grup", "Extent2"."nom_grup" AS "nom_grup" FROM   (SELECT FIRST (45) "Extent1"."id_memo" AS "id_memo", "Extent1"."id_text_grup" AS "id_text_grup" FROM "memos" AS "Extent1" ORDER BY "Extent1"."id_memo" ASC ) AS "Limit1" LEFT OUTER JOIN "texts_grups" AS "Extent2" ON "Limit1"."id_text_grup" = "Extent2"."id_text_grup"
SELECT SKIP (0) "Limit1"."id_memo" AS "id_memo", "Limit1"."id_text_grup" AS "id_text_grup1", "Extent2"."id_text_grup" AS "id_text_grup2", "Extent2"."nom_grup" AS "nom_grup" FROM   (SELECT FIRST (45) "Extent1"."id_memo" AS "id_memo", "Extent1"."id_text_grup" AS "id_text_grup" FROM "memos" AS "Extent1" ORDER BY "Extent1"."id_memo" ASC ) AS "Limit1" LEFT OUTER JOIN "texts_grups" AS "Extent2" ON "Limit1"."id_text_grup" = "Extent2"."id_text_grup" ORDER BY "Limit1"."id_memo" ASC
SELECT SKIP (0) "D"."id_memo" AS "id_memo", "D"."id_text_grup" AS "id_text_grup", "E"."nom_grup" AS "nom_grup" FROM   (SELECT FIRST (45) "C"."id_memo" AS "id_memo", "C"."id_text_grup" AS "id_text_grup" FROM "memos" AS "C" ORDER BY "C"."id_memo" ASC ) AS "D" LEFT OUTER JOIN "texts_grups" AS "E" ON "D"."id_text_grup" = "E"."id_text_grup" ORDER BY "D"."id_memo" ASC
SELECT
"H"."id_memo_data" AS "id_memo_data", 
"H"."id_memo" AS "id_memo", 
"H"."id_idioma" AS "id_idioma", 
"H"."text" AS "text"
FROM   (SELECT SKIP (3) 
	"C"."id_memo" AS "id_memo", 
	(SELECT 
		COUNT("D"."A1") AS "A1"
		FROM ( SELECT 
			1 AS "A1"
			FROM "memos_data" AS "E"
			WHERE "C"."id_memo" = "E"."id_memo"
		)  AS "D") AS "C1"
	FROM "memos" AS "C"
	ORDER BY "C"."C1" DESC ) AS "G"
INNER JOIN "memos_data" AS "H" ON "G"."id_memo" = "H"."id_memo"
SELECT
"H"."id_memo_data" AS "id_memo_data", 
"H"."id_memo" AS "id_memo", 
"H"."id_idioma" AS "id_idioma", 
"H"."text" AS "text"
FROM   (SELECT SKIP (3) "B"."id_memo" AS "id_memo", "B"."C1" AS "C1"
	FROM ( SELECT 
		"C"."id_memo" AS "id_memo", 
		(SELECT 
			COUNT("D"."A1") AS "A1"
			FROM ( SELECT 
				1 AS "A1"
				FROM "memos_data" AS "E"
				WHERE "C"."id_memo" = "E"."id_memo"
			)  AS "D") AS "C1"
		FROM "memos" AS "C"
	)  AS "B"
	ORDER BY "B"."C1" DESC ) AS "G"
INNER JOIN "memos_data" AS "H" ON "G"."id_memo" = "H"."id_memo"
SELECT 
"H"."id_memo_data" AS "id_memo_data", 
"H"."id_memo" AS "id_memo", 
"H"."id_idioma" AS "id_idioma", 
"H"."text" AS "text"
FROM   (SELECT SKIP (3) "skip"."id_memo" AS "id_memo", "skip"."C1" AS "C1"
	FROM ( SELECT 
		"C"."id_memo" AS "id_memo", 
		(SELECT 
			COUNT("D"."A1") AS "A1"
			FROM ( SELECT 
				1 AS "A1"
				FROM "memos_data" AS "E"
				WHERE "C"."id_memo" = "E"."id_memo"
			)  AS "D") AS "C1"
		FROM "memos" AS "C"
	)  AS "skip"
	ORDER BY "skip"."C1" DESC ) AS "G"
INNER JOIN "memos_data" AS "H" ON "G"."id_memo" = "H"."id_memo"

Synology’s support is exceptional

I’m not writing often about services I use etc. But from time to time I’m extremely pleased with some and that’s worth mentioning. This time it’s Synology. I’m using Synology NAS boxes for a many years and in my opinion these are the best. But that’s not what I like to talk about.

Recently one box started behaving very slowly. Both internal processes, Windows share access and web interface. I did couple of usual checks, and checked health of disks. Nothing. At that time also new firmware came out so I decided it will not hurt to update it, maybe it will solve the problem. The download and installation was very slow, of course and I actually needed more attempts to install it. But no specific error, except second to last try when it was showing me problem with free space on system partition. That brought me to suspicion that the slow behavior is related to it. Couple of quick attempts with this and that, but no luck. Before I go to SSH and look and it from inside, I decided to contact support. Maybe they have so tried-and-true solution. The responses were reasonably fast and I end up sending debug dump of system as asked. Synology investigated the dump and it turned out one of the disks in RAID 1 was dying. Sure when I was doing the initial checks, the S.M.A.R.T. was without errors (who knows why). When I ran it after getting the reply, errors were there. Bad timing.

Synology not only – for free – analyzed the dump, but also provided me with description of what disk is failing, serial number etc. They could tell me something like “Your disk is wrong.” and I would not believe it, because I was focused on the system and system partition. Maybe later I would found the errors myself when again checking everything that could go wrong. But that might be too late (well probably not with RAID 1, but why running on thin ice).

With that being said. Great service Synology!

Sherweb’s Hosted Exchange – what a great service

Generally, I’m not recommending services I’m using here. But experience from today is just too great not to share it. I’m using Hosted Exchange from Sherweb.

Last week I ordered something from one e-shop and I didn’t received the email neither the next one after phone urgency what is with my order. Today morning I jumped into support chat with Sherweb and we found that emails has been blocked because of the sending mailserver was on two blacklists. Yep, I thought it’ll something like that. But the people from Sherweb were able not only to found the reason, but also find the emails and manually redeliver(!!!) these after a week(!!!).

Wow. I can’t be more pleased with the attitude (and steps they’re able to do – in most setups I’ve seen, the rejected email is after bouncing the mail (if used) deleted) of Sherweb. The Hosted Exchange service provided is simply great, great service!